Repository navigation
Add support for dimension prefix when using dynamic min-* and max-* - #11217
brandonmcconnell wants to merge 1 commit into
Conversation
92354e1 to
b7ea2cb
Compare
|
Rebased your PR on |
|
Hey thanks @brandonmcconnell! I'm going to close this one for now for a couple reasons:
We've found the only way to successfully stay on top of issues and PRs in a project as big as Tailwind is to be pretty strict about either merging or closing a PR when we review it and not leaving it open, because otherwise things really pile up as often people lose interest in pushing things forward or we simply never reach the point where we're sure it's a good idea to merge something. Hope you understand and know we still value the contribution even if it wasn't merged 👍 If still interested in pushing this forward, feel free to open another PR at some point based on the feedback above and we can reconsider. Thanks! |
|
@adamwathan Thanks for the feedback! A few notes
I’ll also include these follow-up notes in the new PR when I open it, for convenience. Thanks again! |
This PR adds support for using a new dimension prefix with dynamic
min-*andmax-*variants.Syntax:
type-[length]ortype-[dimension:length], where…type:'min' | 'max'dimension:'w' | 'h'(optional, can be excluded to omit and default towidth)length: any valid CSS lengthSyntax examples:
Real use case examples:
only applied on screens taller than
100pxonly applied on screens taller and narrower than
100pxonly applied on screens shorter and narrower than
100px(no conflict betweenmax-[w?:]andmax-[h:])only applied on screens taller and wider than
100px(no conflict betweenmin-[w?:]andmin-[h:])Gotcha / usage note
Using
w:is 100% optional and only exists so either dimension can be defined explicitly if the user so desires. If any prefix is used other thanh:it defaults to usingwidth:, though one consideration could be to throw alog.riskorlog.warnif any non-''/'w:'/'h:'dimension prefix is used.