Question: My idea of generosity is to give happily within my means without any strings attached. Did the Buddha teach about how generosity can be measured?
Answer: Actually, to further practise generosity, we should give more and more gradually, of one’s inner wealth (Dharma, fearlessness, energy, time…) and outer wealth (money, food, shelter…) This is how generosity is stretched until it gets perfected.
Eventually, highly Bodhisattvas who have advanced closer to Buddhahood are even able to repeatedly, in many lives, selflessly give of their lives, along with all of the above to benefit other beings. This is the ultimate measure of generosity. When back from Pure Land after training to realise non-self, is much easier to do this. (Before then, do think twice before sacrificing your life!)
My views, you are right generosity should be carry out within our means and there should no have any attachments.The more we give,the more we get.
How giving should, as above, be gradually stretched: https://thedailyenlightenment.com/2010/12/perfecting-the-first-perfection/
Even the poor should be charitable:
https://thedailyenlightenment.com/2013/07/even-the-poor-should-be-charitable/