surveys icon indicating copy to clipboard operation
surveys copied to clipboard

State of CSS 2024 Suggestions

Open SachaG opened this issue 2 years ago • 37 comments

How can we make the 2024 edition even better?

SachaG avatar Aug 22 '23 21:08 SachaG

https://www.webkit.org/blog/14445/webkit-features-in-safari-17-0/

SachaG avatar Sep 20 '23 04:09 SachaG

https://www.bram.us/2023/10/13/whats-new-in-css-2022-10-12-frontmania/

SachaG avatar Oct 17 '23 06:10 SachaG

https://twitter.com/KevinJPowell/status/1713901131775029337

SachaG avatar Oct 17 '23 06:10 SachaG

https://twitter.com/wesbos/status/1719367659119079492

SachaG avatar Nov 01 '23 04:11 SachaG

https://chriscoyier.net/2023/10/17/a-couple-of-new-css-functions-id-never-heard-of/

SachaG avatar Nov 03 '23 07:11 SachaG

https://www.youtube.com/watch?v=LGRogkgRrOs

SachaG avatar Nov 24 '23 05:11 SachaG

https://www.smashingmagazine.com/2023/11/few-ways-css-easier-write-2023/

SachaG avatar Nov 27 '23 01:11 SachaG

CSS Wrapped

SachaG avatar Dec 08 '23 05:12 SachaG

https://web.dev/blog/baseline-definition-update

SachaG avatar Dec 08 '23 05:12 SachaG

https://web.dev/blog/baseline2023

SachaG avatar Dec 22 '23 06:12 SachaG

https://cloudfour.com/thinks/tylers-css-wish-list-for-2024/

SachaG avatar Jan 12 '24 10:01 SachaG

@ starting-style { }

SachaG avatar Jun 04 '24 05:06 SachaG

Add question about color modes specifically? (lch vs lab vs …)

SachaG avatar Jul 23 '24 00:07 SachaG

See also: https://github.com/orgs/Devographics/projects/6/views/1

SachaG avatar Jul 23 '24 00:07 SachaG

I wonder if the section about CSS frameworks (bootstrap/material/etc.) in its current state still makes sense. In the past I've tried to always keep the list framework-agnostic, but I feel like in 2024 if you do use one it's almost always linked to a specific framework (with the exception of Tailwind).

Not sure if I should embrace that and list e.g. shadcn or Chakra UI; or else de-emphasize that section altogether.

And on the opposite side of the spectrum there's also classless frameworks like https://picocss.com/ which are interesting too, but probably have far less usage…

SachaG avatar Jul 23 '24 05:07 SachaG

New CSS-in-JS libraries:

  • https://mui.com/blog/introducing-pigment-css/
  • https://stylexjs.com/
  • https://panda-css.com/

SachaG avatar Jul 23 '24 05:07 SachaG

In 2023 we had these three related questions:

  • Are there any existing CSS features that you have difficulties using (or avoid altogether) because of lack of support, or differences between browsers?
  • What features do you feel are currently missing from CSS altogether?
  • Any other pain points related to writing CSS?

Do we want to keep them? Do we want to make them freeform (less biasing but more processing work) or predefined?

SachaG avatar Jul 23 '24 06:07 SachaG

In 2023 we had these three related questions ... Do we want to keep them? Do we want to make them freeform (less biasing but more processing work) or predefined?

They should definitely be kept. Regarding predefined or freeform, I think last year we had both, right? I.e. people could add more points in a custom field.

In addition to the points you mentioned, completely freeform answers probably also means less answers as many respondents might not bother to write things. On the other hand, only providing predefined options misses individual needs.

So I'd go for a mix of predefined options plus a freeform field for features not covered by them.

Sebastian

SebastianZ avatar Jul 23 '24 21:07 SebastianZ

I quickly went through the release notes of all three major browsers and have these feature suggestions (not already in last year's survey, AFAICS):

  • MPA View Transitions
  • Scroll-driven Animations
  • @scope
  • Style container queries
  • :user-valid and :user-invalid
  • transition-behavior
  • font-size-adjust
  • zoom
  • align-content on block layout
  • scrollbar-width and scrollbar-color
  • overlay
  • ::spelling-error and ::grammar-error
  • light-dark()
  • New values for clip-path
  • pretty and stable values for text-wrap
  • Math functions (abs(), log(), round(), etc.)
  • Color spaces in gradients
  • Enhanced motion paths
  • New media features like display-mode: picture-in-picture and prefers-reduced-transparency, update, scripting, overflow-block, and overflow-inline
  • Alternative text for content
  • each-line and hanging values for text-indent
  • Custom Highlights API
  • Fallback value for attr()
  • lh and rlh units
  • support() in @import
  • font-format() and font-tech() in @media

Sebastian

SebastianZ avatar Jul 23 '24 22:07 SebastianZ

@SebastianZ thanks, that's super helpful!

SachaG avatar Jul 24 '24 06:07 SachaG

margin-trim

SachaG avatar Jul 24 '24 06:07 SachaG

Should we differentiate between container size and style queries?

SachaG avatar Jul 24 '24 06:07 SachaG

I'd say so, as the usage results will probably be very different. Size queries are already widely available while style queries currently only work in Chrome (and Safari TP).

Sebastian

SebastianZ avatar Jul 24 '24 08:07 SebastianZ

Also I know very little about Tailwind but given its popularity should we devote more of the survey to it? What could we even ask?

SachaG avatar Jul 24 '24 12:07 SachaG

From skimming features in https://wpt.fyi/interop-2024 I think all the big features are already covered. What stands out is @starting-style and transition-behavior, as new features but which I suspect don't make sense on their own. The original motivation for these features was to allow popover animations.

I think that web developers mostly think about these problems as animating to/from display: none and to/from automatic height. Not sure how to best represent that in a survey.

foolip avatar Jul 25 '24 11:07 foolip

@foolip they are slightly different than animating to/from display:none (which is currently not supported in all browsers, while @starting-style and transition-behavior are going baseline soon). I've been grouping all of these features under "entry and exit effects"

una avatar Jul 25 '24 15:07 una

@una thanks for the correction, I don't understand all the pieces and how they fit together. Do you think there's something worth asking about here in the 2024 survey?

foolip avatar Jul 25 '24 15:07 foolip

In the 2023 survey, for the question: "How happy are you with the overall state of CSS?" link

it would be great if developers could optionally be able to add some commentary with their vote, and for the votes to be linked to that commentary so that we can see, for example, what "happy" developers say vs "unhappy" developers.

hvanops avatar Jul 25 '24 16:07 hvanops

@hvanops coincidentally @una suggested the same thing and I just finished implementing it! And adding the ability to filter comments according to the response is a great idea, it's already available for experience/sentiment questions but we could probably generalize it:

Screenshot 2024-07-27 at 9 04 23

SachaG avatar Jul 27 '24 00:07 SachaG

@foolip they are slightly different than animating to/from display:none (which is currently not supported in all browsers, while @starting-style and transition-behavior are going baseline soon). I've been grouping all of these features under "entry and exit effects"

I think it does seem like features worth including in the survey. But like @foolip said it's a question of nomenclature. Do we use the actual name of the property ("transition-behavior"), even though it might not be that meaningful for most people? Or do we talk about what the API can actually achieve ("animating to/from display:none")? Or find some other designation (entry and exit effects") to group all of it?

We can also do a mix of all three, such as calling the feature "entry and exit effects" but having a more explicit description/code example below.

SachaG avatar Jul 27 '24 00:07 SachaG