w3c / w3c/csswg-drafts

CSS transitions should allow binary styles to be changed

Open
#7,804 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-transitions-2
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

It would be nice to be able to do this:

#menuToggle input~#menu {
    /* Hide menu */
    display: none;
    transition: display 0ms 0.5s;
}
#menuToggle input:checked~#menu {
    /* Display menu */
    display: unset;
    transition: display 0ms 0ms;
}

A major thing CSS transitions are lacking right now is the ability to transition "binary" properties such as display, where there is no clear way to gradually transition them. However, this doesn't mean it wouldn't be useful to be able to simply delay their being changed. Being able to slide a pure CSS menu off the page, for example, is currently supported, but it then needs to be set to display:none to take it out of the document flow. When this is specified as a transition, the transition should simply do nothing until the delay has passed and then transition instantly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files, tests, or entry points are named. Start by reviewing the issue's CSS examples and the surrounding CSS Transitions specification work; done means reaching and documenting a resolved behavior for delayed binary-style changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.