-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The fact that we’re using sass-mq is an implementation detail, so we shouldn’t expose it via our public API. This means wrapping their settings with our own settings, and trying to minimise its footprint throughout the app.
- Loading branch information
Showing
8 changed files
with
68 additions
and
74 deletions.
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; |