Skip to content

print if-statements the Kevin Powell way #219

Closed

Description

@bartveneman

CSS @if should be printed as follows:

test {
  color: if(
    media(print): black;
    supports(display: grid): green;
    else: red;
  );
}

See https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/if for docs and potential cases for unit tests.

Activity

  1. bartveneman commented on Aug 4, 2026

    @bartveneman
    MemberAuthor
  2. bartveneman commented on Aug 30, 2026

    @bartveneman
    MemberAuthor

    Fixed in 9aa010d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions