Single post
jump to repliesChoosing an existing #CSS version as base for the #smolweb is complicated 🤔
CSS Mobile Profile 1.0 seems to be a good candidate. It is a subset of CSS 2.1.
It excludes rather than changing existing properties:
No positioning (position: absolute/relative/fixed) - avoided complex layout calculations
No advanced selectors (:hover, :focus, attribute selectors) - reduced parsing overhead
No table layout properties - simplified rendering
No generated content (:before, :after) - reduced memory usage
However, it is difficult to conform this CSS profile for a beautiful website.
Also looking at CSS Mobile Profile 2.0, it's significantly more complex than 1.0 and includes features that may conflict with smolweb goals of lightweight, computationally-efficient CSS.
Other option is to open smolweb to the whole CSS 2.1 (or 2.2) profile.
In all case, a smolweb site must be browsable with disabled styles (inline style blocks and linked CSS)
https://www.w3.org/TR/2000/WD-css-mobile-20001013
https://www.w3.org/TR/2014/NOTE-css-mobile-20141014/
Which version is the most adapted to the smolweb ?
2 replies
back to top@adele I'd hope to have any usable, but a validator could warn me when exceeding some baseline (maybe mobile 1.0) and ask to check that things also look fine in a version where all non-baseline rules are disabled.
For parsing complexity, I think that'd mean a parser can skip what exceeds its profile; web parsers are generally robust, I think that goes for small too.
@chrysn Yes, the solution could be to list a base of CSS properties (maybe Mobile 1.0). Respecting this list would give a grade A site. And degrade the note in function of usage of complex properties.