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
Prerequisites
Describe the Feature Request
Simply expose this through a const or CSS variable construction of sorts
ionic-framework/core/src/themes/ionic.globals.scss
Lines 27 to 33 in 5e030f9
Or
ionic-framework/core/src/components/split-pane/split-pane.tsx
Lines 10 to 17 in 451d220
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-breakpointsis 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