What's wrong with the inline ruleset (in the style attribute)?
So, I wanted to use a "ul" style ruleset so that all of its "li" children have "display: inline".
<ul style="li {display:inline}">
<li>item 1</li>
<li>item 1</li>
<li>item 1</li>
<li>item 1</li>
</ul>
I thought it was possible and I came from the old CSS link:
http://www.w3.org/TR/2001/WD-css-style-attr-20010305
<p style="{color: green; width: 10em} /* a+=0 b+=0 c+=0 */
::first-letter {float: left; font-size: 300%} /* a+=0 b+=0 c+=1 */
">
However, it looks like it got away with the latest versions of CSS. Does anyone know the status of this feature?
PS: avoid comments: you should be using classes / stylesheets. Demeret law is also important for service.
source to share
http://www.w3.org/TR/2001/WD-css-style-attr-20010305 is an ancient (2001) working draft. It just never made it into any CSS spec.
source to share
When looking at the official specs, it's always a good idea to check that you are looking at the latest version and that this is indeed the recommended implementation, not just a draft.
The version you are looking at is marked as Working Draft , published in March 2001 . This means that it is not the final version and 2. rather old.
He even states:
This draft was prepared by the CSS working group as part of the style activity. This is a public W3C working draft for consideration by W3C members and other interested parties. As a draft document, it can be updated, replaced or outdated by other documents at any time. It is inappropriate to use W3C working drafts as reference material or to align them with "unfinished" drafts.
There are several links at the top at the top. One of them will lead us to the most modern version:
This particular version ( http://www.w3.org/TR/css-style-attr ) was published in November 2013 and is a Recommendation . This means that 1. is much more recent, and 2. is no longer just a draft, but actually a recommended one for use.
This version states:
This document has been reviewed by W3C members, software developers and other W3C groups and stakeholders, and has been endorsed by the Director as a W3C Recommendation. It is a stable document and can be used as a reference or quoted from another document. The role of the W3C in drafting the Recommendation is to draw attention to the specification and to facilitate its widespread deployment. This improves the functionality and interoperability of the Internet.
This latest version does not contain the syntax you want to use.
source to share
As stated in the project:
This draft was prepared by the CSS working group as part of the style activity. This is a public W3C working draft for consideration by W3C members and other interested parties. As a draft document, it can be updated, replaced or outdated by other documents at any time . It is inappropriate to use the W3C working drafts as reference material or to align them with the "unfinished" ones.
Syntax of CSS rules in HTML "style" attribute ( http://www.w3.org/TR/2001/WD-css-style-attr-20010305 )
It looks like this was addressed at some point, but has since been removed as the working draft was replaced with CSS Style Attributes , which reads:
The style attribute value must match the syntax of the content of the CSS declaration block (excluding separating curly braces)
CSS Style Attributes ( http://www.w3.org/TR/css-style-attr/ )
Given that the W3C (and most developers!) Recommend using external stylesheets, in most cases I personally don't think this will be implemented in the future in the future:
To specify style information for multiple elements, authors must use the STYLE element. For optimal flexibility, authors should define styles in external style sheets.
Style Sheets ( http://www.w3.org/TR/html401/present/styles.html )
source to share
