W3C home > Mailing lists > Public > www-style@w3.org > September 2013

RE: [css-shapes][css-values] getComputedStyle for Percentages used as length

From: François REMY <francois.remy.dev@outlook.com>
Date: Mon, 16 Sep 2013 23:37:35 +0200
Message-ID: <DUB120-W15F328D5FFC87907FCBAFAA5260@phx.gbl>
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: "www-style@w3.org" <www-style@w3.org>
Just to be sure before updating, would that text be okay:

# getComputedStyle:
# 
# Returns a style object allowing to retrieve the values of all
# the CSS properties of an element after applying the active
# stylesheets and resolving any basic computation those values
# may contain. 

and, for more details:

# The returned object actually represents the CSS resolved 
# values, not the computed values. While those values are
# usually equal, some older CSS properties like 'width' or
# 'border' will return their used value instead.



I also clarified the following text that explains the history of the feature:

# Originally, CSS 2.0 defined the computed values to be the final
# "ready to be used" values of properties after cascading and
# inheritance, but CSS 2.1 redefined computed values as pre-layout,
# and used values as post-layout. 
#
# The differences between pre- and post-layout does include the
# resolution of percentages relative to the width or the height of
# an element (its layout). 
#
# While the computed style will return percentages values untouched
# in this case, the getComputedStyle function will sometimes, due to
# backwards compatibility, return the old meaning of computed values
# (now called used values) for a specific set of properties and resolve
# those percentages anyway. 
# 
# There is, however, no unique DOM API to strictly get
# the CSS 2.1 computed values, nor the CSS 2.1 used values.


Does that seem okay to you? 		 	   		  
Received on Monday, 16 September 2013 21:38:02 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:32 UTC