Skip to content

CSS: range media query syntax (flip stylelint media-feature-range-notation) #86

Open

Description

@johnhringiv

Context

Responsive utilities and .container use legacy min-width queries with Tailwind breakpoints written as literals in several places (app.css ~L426–430, L440, L452, L467, L595): 640 / 768 / 1024 / 1280 / 1536.

Bootstrap 6 moved to range syntax ((width >= 768px)) throughout.

Proposed

  • Convert to range syntax — clearer, and any future max-width query becomes (width < 1024px) with no .98px overlap hacks.
  • Consider @custom-media --md (width >= 768px); for one source of breakpoint truth. Vite's default CSS pipeline doesn't transpile @custom-media, so that part would need css.transformer: 'lightningcss' with drafts.customMedia — only worth it if switching the transformer anyway; plain range syntax is natively supported by all target browsers.
  • .stylelintrc.cjs currently pins 'media-feature-range-notation': 'prefix' ("matches the file's existing style"). Flip it to 'context' (the config-standard default) and stylelint --fix does most of the conversion automatically.

Inspired by the Bootstrap 6 alpha (migration guide) — not adopting Bootstrap, just borrowing the idea.

🤖 Generated with Claude Code

Activity

  1. added
    enhancement
    on Oct 9, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions