Skip to content

feat: Expose scss breakpoints #27063

@abdel-ships-it

Description

@abdel-ships-it

Prerequisites

Describe the Feature Request

Simply expose this through a const or CSS variable construction of sorts

$screen-breakpoints: (
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
) !default;

Or

const QUERY: { [key: string]: string } = {
xs: '(min-width: 0px)',
sm: '(min-width: 576px)',
md: '(min-width: 768px)',
lg: '(min-width: 992px)',
xl: '(min-width: 1200px)',
never: '',
};

Describe the Use Case

I want to show / hide elements based on the split pane hiding, right now I have to hardcode the breakpoint which the split pane uses which is 576px. Ideally I use the same value the split pane uses under the hood, to avoid risking out of sync problems should the team update the 576px value to something else internally.

Describe Preferred Solution

There seems to be duplication in your own codebase, the SASS $screen-breakpoints is sometimes used, and in the case of split pane component its hardcoded. Ideally you simplify this by using CSS variables.

Edit

CSS variables dont work in media queries, so exposing the CSS map is only viable solution here

https://stackoverflow.com/questions/40722882/css-native-variables-not-working-in-media-queries

Describe Alternatives

No response

Related Code

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: replythe issue needs a response from the user

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions