Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

min-height: stretch is not a valid property value #825

Open
angelikatyborska opened this issue Aug 15, 2024 · 3 comments
Open

min-height: stretch is not a valid property value #825

angelikatyborska opened this issue Aug 15, 2024 · 3 comments

Comments

@angelikatyborska
Copy link
Contributor

In box-sizing.scss, there's this code:

#{layout.$viewport-elements} {
  height: 100%;
  min-height: stretch;
}

but stretch is not a valid value for the min-height property. See https://developer.mozilla.org/en-US/docs/Web/CSS/min-height#syntax

Screenshot 2024-08-15 at 10 55 16
@angelikatyborska
Copy link
Contributor Author

I read a bit too fast 😁 it is "valid, but experimental". According to MDN, it's not supported in Firefox:

Screenshot 2024-08-19 at 08 36 43

But according to caniuse, it's not supported anywhere without a prefix. min-height: stretch does not work in my Chrome, but min-height: -webkit-fill-available does.

Screenshot 2024-08-19 at 08 42 24

@angelikatyborska
Copy link
Contributor Author

The whole reason I noticed this is our current backend client project, which just imports bitstyles with no extra postprocessing like autoprefixer. In our recent frontend client project, we had autoprefixer so it did it's job:

Screenshot 2024-08-19 at 08 45 00

Is the assumption that users of bitstyles are supposed to use autoprefixer?

@planktonic
Copy link
Member

It has been written with autoprefixer in mind — write modern CSS, rely on autoprefixer to handle some of the backwards-compatibility — but it’s not explicitly required. There’s never (until now!) been an instance where not using autoprefixer would break a feature or component even for modern browsers — the reduction of support from not using autoprefixer has been seen as a user decision.

I guess we have a few options:

  • require autoprefixer as a peer dependency
  • don’t require it, but add a note to our readme pointing out that there may be issues if you don’t use it
  • collate which of the three min-height declarations are actually valid & used in each browser, then use that/those. We should check what autoprefixer, cssnano etc do with that too i.e. check the final minified CSS output

Did I miss any?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants