Skip to content

Remove default media: 'screen' for stylesheet tag in line with Rails defaults #535

Closed

Description

@brendon

Rails now doesn't include the media attribute by default for stylesheet_link_tag but the default for vite_javascript_tag has media: 'screen':

rails/rails#41213

It'd be a breaking change but would keep things in line with the new rails defaults.

vite_stylesheet_tag would now also not return a media attribute since it relies on stylesheet_link_tag without any default options.

Activity

  1. added
    bug: pending triage
    on Mar 11, 2025
  2. added
    planned: 4.0
    and removed
    bug: pending triage
    on Mar 26, 2025
  3. added a commit that references this issue on Oct 13, 2026
    a7cd412
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

    planned: 4.0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions