- From: Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
- Date: Wed, 25 Jan 2012 19:20:58 +0400
- To: Christoph Päper <christoph.paeper@crissov.de>
- Cc: www-style list <www-style@w3.org>
25.01.2012, 19:04, "Christoph Päper" <christoph.paeper@crissov.de>: > Marat Tanalin: > >> rgb(255, 0, 64, 1%) /* 1% */ >> rgb(255, 0, 64, 1) /* 100% */ > > The first line should be invalid, because quite some time ago the WG decided that you cannot mix percentages and (byte) integers in three-parametric ‘rgb()’ – implementations have been changed afterwards – and we should keep it that way. Therefore the second line would have an alpha value close to 0.4%. > > That means > > rgb(255, 0, 64, 0.7) > > would be treated the same way as > > rgb(255, 0, 64.3) > > is today. (I’m not sure right now, whether it’s actually invalid or rounded.) Therefore, it differs from > > rgba(255, 0, 64, 0.7) I think having two similar functions with different syntax [rgba(255, 0, 64, .7), rgb(255, 0, 64, 70)] would be quite confusing. So, if we can't use percentage values in rgb()/rgba() [though it looks quite strange and unreasonable, and probably should be reconsidered now], then we probably may just make 4-parameter form of rgb() to be exact alias of rgba() as it's defined currently, and not more.
Received on Wednesday, 25 January 2012 15:21:31 UTC