-
Merge branch '25198-improper-use-of-bootstrap-media-query-variables' into 'master' · 783f8a0eAnnabel Dunstone Gray authored
Resolve "Improper use of bootstrap media query variables" ## What does this MR do? Corrects media queries which are off by `1px` due to incorrect `$screen-{xs,sm,md,lg}-min` usage. ## Are there points in the code the reviewer needs to double check? Ensure none of these errors were somehow intentional (I can't imagine a legitimate use case for `@media (max-width: $screen-sm-min)` though) ## Why was this MR needed? When "min" breakpoints are used for "max-width" media queries, they create an overlap in rule breakpoints. For instance in the following scenario: ```scss .foo { @media (min-width: $screen-sm-min) { width: 100px; padding: 0; } @media (max-width: $screen-sm-min) { padding: 10px 0; } } ``` If the viewport were set to exactly `$screen-sm-min` pixels, both of these media queries would apply. It is important to use `max-width: $screen-xs-max` in this case which is equal to `$screen-sm-min - 1`. ## Does this MR meet the acceptance criteria? - [ ] ~~[Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added~~ - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~API support added~~ - Tests - [ ] ~~Added for this feature/bug~~ - [ ] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #25198 See merge request !7863
783f8a0e
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
assets | Loading commit data... | |
controllers | Loading commit data... | |
finders | Loading commit data... | |
helpers | Loading commit data... | |
mailers | Loading commit data... | |
models | Loading commit data... | |
policies | Loading commit data... | |
serializers | Loading commit data... | |
services | Loading commit data... | |
uploaders | Loading commit data... | |
validators | Loading commit data... | |
views | Loading commit data... | |
workers | Loading commit data... |