-
Notifications
You must be signed in to change notification settings - Fork 338
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
Document (non-contentious parts of) Sass settings layer #748
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
// If you want to display the currently active breakpoint in the top | ||
// right corner of your site during development, add the breakpoints | ||
// to this list, ordered by width, e.g. (mobile, tablet, desktop). | ||
$mq-show-breakpoints: (desktop); | ||
@import "../../../src/all-ie8"; | ||
@import "partials/app"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
// If you want to display the currently active breakpoint in the top | ||
// right corner of your site during development, add the breakpoints | ||
// to this list, ordered by width, e.g. (mobile, tablet, desktop). | ||
$mq-show-breakpoints: (mobile, tablet, desktop); | ||
$govuk-show-breakpoints: true; | ||
|
||
@import "../../../src/all"; | ||
@import "partials/app"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,23 @@ | ||
// Media query helpers using sass-mq | ||
// https://github.com/sass-mq/sass-mq | ||
//// | ||
/// @group settings/media-queries | ||
//// | ||
|
||
// mq() takes up to three optional parameters: | ||
// $from: inclusive min-width boundary | ||
// $until: exclusive max-width boundary | ||
// $and: additional custom directives | ||
// $media-type: $mq-media-type // defaults to 'all' | ||
/// Breakpoint definitions | ||
/// | ||
/// @type Map | ||
/// @access public | ||
|
||
// Write css mobile-first, overriding mobile styles for tablet and desktop | ||
// | ||
// .govuk-component { | ||
// // Apply styling to mobile and upwards | ||
// @include mq($from: mobile) { | ||
// color: red; | ||
// } | ||
// // Apply styling up to devices smaller than tablets (exclude tablets) | ||
// @include mq($until: tablet) { | ||
// color: blue; | ||
// } | ||
// // Same thing, in landscape orientation | ||
// @include mq($until: tablet, $and: '(orientation: landscape)') { | ||
// color: hotpink; | ||
// } | ||
// // Apply styling to tablets up to desktop (exclude desktop) | ||
// @include mq(tablet, desktop) { | ||
// color: green; | ||
// } | ||
// // Print only styling | ||
// @include mq($media-type: print) { | ||
// display: none; | ||
// } | ||
// } | ||
|
||
|
||
// To enable support for browsers that do not support @media queries, | ||
// (IE <= 8, Firefox <= 3, Opera <= 9) set $mq-responsive to false | ||
// Create a separate stylesheet served exclusively to these browsers, | ||
// meaning @media queries will be rasterized, relying on the cascade itself | ||
@if ($govuk-is-ie8) { | ||
$mq-responsive: false; | ||
} @else { | ||
$mq-responsive: true; | ||
} | ||
|
||
// Name your breakpoints in a way that creates a ubiquitous language | ||
// across team members. It will improve communication between | ||
// stakeholders, designers, developers, and testers. | ||
$mq-breakpoints: ( | ||
$govuk-breakpoints: ( | ||
mobile: 320px, | ||
// Support max-width value from FET ? | ||
// mobile: 640px, | ||
tablet: 641px, | ||
desktop: 769px | ||
); | ||
) !default; | ||
|
||
/// Show active breakpoint in top-right corner. | ||
/// | ||
/// Only use this during local development. | ||
/// | ||
/// @type Boolean | ||
/// @access public | ||
|
||
// Define the breakpoint from the $mq-breakpoints list that should | ||
// be used as the target width when outputting a static stylesheet | ||
// (i.e. when $mq-responsive is set to 'false'). | ||
$mq-static-breakpoint: desktop; | ||
$govuk-show-breakpoints: false !default; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason behind the change of these values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question - it used to use the default
sass-mq
breakpoints, now it's using the ones defined in our settings.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add this to the PR comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.