Thread of 2 posts

jump to replies

Choosing 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/

https://www.w3.org/TR/CSS22/

Which version is the most adapted to the smolweb ?

Poll closed , 7 votes total
  • Option 1, Mobile Profile 1.0
    14.29% , 1 vote
  • Option 2, Mobile Profile 2.0
    14.29% , 1 vote
  • Option 3, CSS 2.1
    14.29% , 1 vote
  • Option 4, CSS 2.2
    57.14% , 4 votes

5 replies

back to top
Dillo browser , @dillo@fosstodon.org
(open profile)

@adele I haven't seen a notification from this mention. The "@ dillo" part is not a link either.

I think you should first decide which independent browsers you want to target, then identify which features they support and from there draw a common set of features for the CSS spec.

As a rough idea, implementing floats added 20+k lines in dillo rendering engine, which was 20k lines at the time. I would not include it.

I can provide a longer answer, but fedi is a bit limited for long form.

Dillo browser , @dillo@fosstodon.org
(open profile)

@adele I think most of the features yes, but some I'm not sure.

Extending our test suite would be nice, here is an example. These two should render the same in a browser that supports min-width and max-width:

github.com/dillo-browser/dillo

github.com/dillo-browser/dillo

chrysn , @chrysn@chaos.social
(open profile)

@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.