reustyle 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.drone.yml +17 -0
- data/.gitignore +25 -0
- data/.nvmrc +1 -0
- data/.rbenv-gemsets +1 -0
- data/.ruby-version +1 -0
- data/CONTRIBUTING.md +68 -0
- data/Gemfile +4 -0
- data/Gruntfile.js +234 -0
- data/LICENSE.txt +13 -0
- data/README.md +196 -0
- data/Rakefile +6 -0
- data/bower.json +54 -0
- data/config/autoprefixer.yml +6 -0
- data/config/scss-lint.yml +55 -0
- data/dist/icons.svg +1 -0
- data/dist/ustyle-content.css +1 -0
- data/dist/ustyle-latest.css +1 -0
- data/dist/ustyle.js +567 -0
- data/dist/ustyle.json +1 -0
- data/dist/ustyle.min.js +1 -0
- data/grunt/modules/dss-helper.js +115 -0
- data/grunt/modules/file.js +24 -0
- data/grunt/modules/html-parser.js +22 -0
- data/grunt/modules/templates.js +57 -0
- data/grunt/tasks/browser-sync.js +23 -0
- data/grunt/tasks/builder.js +67 -0
- data/grunt/tasks/styleguide.js +299 -0
- data/index.js +37 -0
- data/lib/ustyle/deploy.rb +41 -0
- data/lib/ustyle/engine.rb +32 -0
- data/lib/ustyle/hash.rb +44 -0
- data/lib/ustyle/helpers/icon_helper.rb +15 -0
- data/lib/ustyle/icons.rb +13 -0
- data/lib/ustyle/middleware/icon_middleware.rb +27 -0
- data/lib/ustyle/sass_functions.rb +65 -0
- data/lib/ustyle/sinatra.rb +34 -0
- data/lib/ustyle/sprockets.rb +6 -0
- data/lib/ustyle/utils.rb +42 -0
- data/lib/ustyle/version.rb +4 -0
- data/lib/ustyle.rb +58 -0
- data/package-lock.json +9303 -0
- data/package.json +89 -0
- data/styleguide/CNAME +1 -0
- data/styleguide/assets/images/CTAs.png +0 -0
- data/styleguide/assets/images/badge-label-usp.png +0 -0
- data/styleguide/assets/images/bower-logo.png +0 -0
- data/styleguide/assets/images/caveat.png +0 -0
- data/styleguide/assets/images/cloudfront-logo.png +0 -0
- data/styleguide/assets/images/design-conventions.png +0 -0
- data/styleguide/assets/images/error-texts.png +0 -0
- data/styleguide/assets/images/external-requirements.png +0 -0
- data/styleguide/assets/images/favicon/android-chrome-192x192.png +0 -0
- data/styleguide/assets/images/favicon/android-chrome-512x512.png +0 -0
- data/styleguide/assets/images/favicon/apple-touch-icon-114x114.png +0 -0
- data/styleguide/assets/images/favicon/apple-touch-icon-120x120.png +0 -0
- data/styleguide/assets/images/favicon/apple-touch-icon-144x144.png +0 -0
- data/styleguide/assets/images/favicon/apple-touch-icon-152x152.png +0 -0
- data/styleguide/assets/images/favicon/apple-touch-icon-180x180.png +0 -0
- data/styleguide/assets/images/favicon/apple-touch-icon-57x57.png +0 -0
- data/styleguide/assets/images/favicon/apple-touch-icon-60x60.png +0 -0
- data/styleguide/assets/images/favicon/apple-touch-icon-72x72.png +0 -0
- data/styleguide/assets/images/favicon/apple-touch-icon-76x76.png +0 -0
- data/styleguide/assets/images/favicon/apple-touch-icon.png +0 -0
- data/styleguide/assets/images/favicon/browserconfig.xml +9 -0
- data/styleguide/assets/images/favicon/favicon-16x16.png +0 -0
- data/styleguide/assets/images/favicon/favicon-32x32.png +0 -0
- data/styleguide/assets/images/favicon/favicon.ico +0 -0
- data/styleguide/assets/images/favicon/manifest.json +18 -0
- data/styleguide/assets/images/favicon/mstile-144x144.png +0 -0
- data/styleguide/assets/images/favicon/mstile-150x150.png +0 -0
- data/styleguide/assets/images/favicon/mstile-310x150.png +0 -0
- data/styleguide/assets/images/favicon/mstile-310x310.png +0 -0
- data/styleguide/assets/images/favicon/mstile-70x70.png +0 -0
- data/styleguide/assets/images/favicon/safari-pinned-tab.svg +46 -0
- data/styleguide/assets/images/icons.svg +1 -0
- data/styleguide/assets/images/infographic-01.png +0 -0
- data/styleguide/assets/images/infographic-02.png +0 -0
- data/styleguide/assets/images/npm-logo.png +0 -0
- data/styleguide/assets/images/placeholder-text.png +0 -0
- data/styleguide/assets/images/ruby-logo.png +0 -0
- data/styleguide/assets/images/site-consistency01.png +0 -0
- data/styleguide/assets/images/site-consistency02.png +0 -0
- data/styleguide/assets/images/site-consistency03.png +0 -0
- data/styleguide/assets/images/styleguide-examples/accurate-housing.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/altered.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/bad-subject.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/centered.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/cliche.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/cold.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/good-subject.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/illustrations_1.png +0 -0
- data/styleguide/assets/images/styleguide-examples/illustrations_2.png +0 -0
- data/styleguide/assets/images/styleguide-examples/illustrations_3.png +0 -0
- data/styleguide/assets/images/styleguide-examples/illustrations_4.png +0 -0
- data/styleguide/assets/images/styleguide-examples/illustrations_5.png +0 -0
- data/styleguide/assets/images/styleguide-examples/illustrations_6.png +0 -0
- data/styleguide/assets/images/styleguide-examples/innaccurate-housing.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/natural-1.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/natural-2.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/natural-3.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/not-centered.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/realistic.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/unaltered.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/unnatural-1.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/unnatural-2.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/unnatural-3.jpg +0 -0
- data/styleguide/assets/images/styleguide-examples/warm.jpg +0 -0
- data/styleguide/assets/images/tone-framework.png +0 -0
- data/styleguide/assets/images/tone.png +0 -0
- data/styleguide/assets/images/tooltip.png +0 -0
- data/styleguide/assets/images/tsandcs.png +0 -0
- data/styleguide/assets/images/ustyle.svg +73 -0
- data/styleguide/assets/images/ux-conventions-consistency.png +0 -0
- data/styleguide/assets/images/ux-conventions-error.png +0 -0
- data/styleguide/assets/images/ux-conventions-errors.png +0 -0
- data/styleguide/assets/images/ux-conventions-flexibility.png +0 -0
- data/styleguide/assets/images/ux-conventions-freedom.png +0 -0
- data/styleguide/assets/images/ux-conventions-minimalist.png +0 -0
- data/styleguide/assets/images/ux-conventions-real-world.png +0 -0
- data/styleguide/assets/images/ux-conventions-recognition.png +0 -0
- data/styleguide/assets/images/ux-conventions-visibility.png +0 -0
- data/styleguide/assets/javascripts/app.js +115 -0
- data/styleguide/assets/javascripts/modules/stats.js +50 -0
- data/styleguide/assets/javascripts/vendor/highlight.js +1 -0
- data/styleguide/assets/javascripts/vendor/svg4everybody.js +1 -0
- data/styleguide/assets/sass/main.scss +42 -0
- data/styleguide/assets/sass/modules/_code.scss +8 -0
- data/styleguide/assets/sass/modules/_colours.scss +26 -0
- data/styleguide/assets/sass/modules/_copyright.scss +4 -0
- data/styleguide/assets/sass/modules/_grid.scss +12 -0
- data/styleguide/assets/sass/modules/_home.scss +5 -0
- data/styleguide/assets/sass/modules/_images.scss +24 -0
- data/styleguide/assets/sass/modules/_links.scss +3 -0
- data/styleguide/assets/sass/modules/_logo.scss +182 -0
- data/styleguide/assets/sass/modules/_made-at.scss +6 -0
- data/styleguide/assets/sass/modules/_markdown.scss +7 -0
- data/styleguide/assets/sass/modules/_nav-mobile.scss +72 -0
- data/styleguide/assets/sass/modules/_nav.scss +32 -0
- data/styleguide/assets/sass/modules/_sidebar.scss +94 -0
- data/styleguide/assets/sass/modules/_states.scss +4 -0
- data/styleguide/assets/sass/modules/_styleguide.scss +138 -0
- data/styleguide/assets/sass/modules/_table.scss +3 -0
- data/styleguide/assets/sass/modules/_tooltip.scss +9 -0
- data/styleguide/assets/sass/modules/_typography.scss +14 -0
- data/styleguide/assets/sass/modules/_version.scss +11 -0
- data/styleguide/assets/sass/structure/_base.scss +18 -0
- data/styleguide/assets/sass/structure/_header.scss +12 -0
- data/styleguide/assets/sass/vendor/_highlight.scss +139 -0
- data/styleguide/assets/sass/vendor/_pure-table.scss +75 -0
- data/styleguide/content/brand/index.md +47 -0
- data/styleguide/content/brand/logo.tpl +279 -0
- data/styleguide/content/design/accessibility-testing.md +82 -0
- data/styleguide/content/design/index.tpl +367 -0
- data/styleguide/content/design/typography.md +68 -0
- data/styleguide/content/design/validating-designs.tpl +304 -0
- data/styleguide/content/index.tpl +51 -0
- data/styleguide/content/language/grammar.md +220 -0
- data/styleguide/content/language/microcopy.md +170 -0
- data/styleguide/content/language/tone.md +135 -0
- data/styleguide/content/pattern-library/grid.tpl +64 -0
- data/styleguide/content/pattern-library/index.tpl +88 -0
- data/styleguide/partials/_footer.tpl +8 -0
- data/styleguide/partials/_head.tpl +26 -0
- data/styleguide/partials/_header.tpl +37 -0
- data/styleguide/partials/_sidebar.tpl +27 -0
- data/styleguide/partials/colour.tpl +24 -0
- data/styleguide/partials/icons.tpl +28 -0
- data/styleguide/partials/style_block.tpl +44 -0
- data/styleguide/templates/simple.tpl +25 -0
- data/styleguide/templates/stats.tpl +50 -0
- data/styleguide/templates/styleguide.tpl +36 -0
- data/tasks/publish.rake +67 -0
- data/ustyle.gemspec +32 -0
- data/vendor/assets/images/forms/checkbox-rebrand.svg +1 -0
- data/vendor/assets/images/forms/checkbox.svg +1 -0
- data/vendor/assets/images/icons/alarm.svg +1 -0
- data/vendor/assets/images/icons/android.svg +1 -0
- data/vendor/assets/images/icons/arrow-circle.svg +1 -0
- data/vendor/assets/images/icons/arrow-down.svg +1 -0
- data/vendor/assets/images/icons/arrow-up.svg +1 -0
- data/vendor/assets/images/icons/book.svg +1 -0
- data/vendor/assets/images/icons/bookmark.svg +1 -0
- data/vendor/assets/images/icons/breadcrumb.svg +1 -0
- data/vendor/assets/images/icons/calculator.svg +1 -0
- data/vendor/assets/images/icons/calendar.svg +1 -0
- data/vendor/assets/images/icons/car.svg +1 -0
- data/vendor/assets/images/icons/checkbox-tick.svg +1 -0
- data/vendor/assets/images/icons/chevron-left.svg +1 -0
- data/vendor/assets/images/icons/chevron-right.svg +1 -0
- data/vendor/assets/images/icons/clock.svg +1 -0
- data/vendor/assets/images/icons/close.svg +1 -0
- data/vendor/assets/images/icons/cog.svg +1 -0
- data/vendor/assets/images/icons/controller.svg +1 -0
- data/vendor/assets/images/icons/credit-card.svg +1 -0
- data/vendor/assets/images/icons/cross.svg +1 -0
- data/vendor/assets/images/icons/dashcam.svg +1 -0
- data/vendor/assets/images/icons/dual-fuel.svg +1 -0
- data/vendor/assets/images/icons/electric-light.svg +1 -0
- data/vendor/assets/images/icons/envelope.svg +1 -0
- data/vendor/assets/images/icons/exit-noexit.svg +1 -0
- data/vendor/assets/images/icons/facebook-brand.svg +1 -0
- data/vendor/assets/images/icons/facebook.svg +1 -0
- data/vendor/assets/images/icons/filter.svg +1 -0
- data/vendor/assets/images/icons/fixed-variable.svg +1 -0
- data/vendor/assets/images/icons/gas.svg +1 -0
- data/vendor/assets/images/icons/gauge.svg +1 -0
- data/vendor/assets/images/icons/github.svg +1 -0
- data/vendor/assets/images/icons/google-brand.svg +1 -0
- data/vendor/assets/images/icons/google.svg +1 -0
- data/vendor/assets/images/icons/graph-up.svg +1 -0
- data/vendor/assets/images/icons/home.svg +1 -0
- data/vendor/assets/images/icons/hot.svg +1 -0
- data/vendor/assets/images/icons/info.svg +1 -0
- data/vendor/assets/images/icons/kettle.svg +1 -0
- data/vendor/assets/images/icons/key.svg +1 -0
- data/vendor/assets/images/icons/lock.svg +1 -0
- data/vendor/assets/images/icons/magnify-in.svg +1 -0
- data/vendor/assets/images/icons/magnify.svg +1 -0
- data/vendor/assets/images/icons/menu.svg +1 -0
- data/vendor/assets/images/icons/message.svg +1 -0
- data/vendor/assets/images/icons/mobile.svg +1 -0
- data/vendor/assets/images/icons/monthly-dd.svg +1 -0
- data/vendor/assets/images/icons/network.svg +1 -0
- data/vendor/assets/images/icons/no-exit.svg +1 -0
- data/vendor/assets/images/icons/pdf.svg +1 -0
- data/vendor/assets/images/icons/pencil.svg +1 -0
- data/vendor/assets/images/icons/person-add.svg +1 -0
- data/vendor/assets/images/icons/person.svg +1 -0
- data/vendor/assets/images/icons/phone.svg +1 -0
- data/vendor/assets/images/icons/piggy-bank.svg +1 -0
- data/vendor/assets/images/icons/pin.svg +1 -0
- data/vendor/assets/images/icons/play.svg +1 -0
- data/vendor/assets/images/icons/pound-circle.svg +1 -0
- data/vendor/assets/images/icons/pound-note.svg +1 -0
- data/vendor/assets/images/icons/present.svg +1 -0
- data/vendor/assets/images/icons/print.svg +1 -0
- data/vendor/assets/images/icons/quarterly-dd.svg +1 -0
- data/vendor/assets/images/icons/question-circle.svg +1 -0
- data/vendor/assets/images/icons/quote.svg +1 -0
- data/vendor/assets/images/icons/recycle.svg +1 -0
- data/vendor/assets/images/icons/remove.svg +1 -0
- data/vendor/assets/images/icons/renewable.svg +1 -0
- data/vendor/assets/images/icons/results.svg +1 -0
- data/vendor/assets/images/icons/save.svg +1 -0
- data/vendor/assets/images/icons/share.svg +1 -0
- data/vendor/assets/images/icons/shield.svg +1 -0
- data/vendor/assets/images/icons/sim.svg +1 -0
- data/vendor/assets/images/icons/smiley.svg +1 -0
- data/vendor/assets/images/icons/sort.svg +1 -0
- data/vendor/assets/images/icons/speech-circle.svg +1 -0
- data/vendor/assets/images/icons/speech.svg +1 -0
- data/vendor/assets/images/icons/spinner-rebrand.svg +1 -0
- data/vendor/assets/images/icons/spinner.svg +1 -0
- data/vendor/assets/images/icons/star-half.svg +1 -0
- data/vendor/assets/images/icons/star.svg +1 -0
- data/vendor/assets/images/icons/starline-half.svg +1 -0
- data/vendor/assets/images/icons/starline.svg +1 -0
- data/vendor/assets/images/icons/talk.svg +1 -0
- data/vendor/assets/images/icons/tick-circle.svg +1 -0
- data/vendor/assets/images/icons/tick.svg +1 -0
- data/vendor/assets/images/icons/tv.svg +1 -0
- data/vendor/assets/images/icons/twitter-brand.svg +1 -0
- data/vendor/assets/images/icons/twitter.svg +1 -0
- data/vendor/assets/images/icons/ustyle.svg +1 -0
- data/vendor/assets/images/icons/uswitch.svg +1 -0
- data/vendor/assets/images/icons/variable.svg +1 -0
- data/vendor/assets/images/icons/warning-circle.svg +1 -0
- data/vendor/assets/images/icons/warning.svg +1 -0
- data/vendor/assets/images/icons/wifi.svg +1 -0
- data/vendor/assets/images/icons/wiki.svg +1 -0
- data/vendor/assets/images/icons/xml.svg +1 -0
- data/vendor/assets/images/icons.svg +1 -0
- data/vendor/assets/javascripts/ustyle/backdrop.js +56 -0
- data/vendor/assets/javascripts/ustyle/classtoggler.js +76 -0
- data/vendor/assets/javascripts/ustyle/overlay.js +152 -0
- data/vendor/assets/javascripts/ustyle/tabs.js +166 -0
- data/vendor/assets/javascripts/ustyle/utils.js +113 -0
- data/vendor/assets/javascripts/ustyle.js +4 -0
- data/vendor/assets/stylesheets/rebrand-content.scss +1 -0
- data/vendor/assets/stylesheets/rebrand.scss +1 -0
- data/vendor/assets/stylesheets/ustyle/_all.scss +55 -0
- data/vendor/assets/stylesheets/ustyle/_content.scss +5 -0
- data/vendor/assets/stylesheets/ustyle/_global.scss +20 -0
- data/vendor/assets/stylesheets/ustyle/articles/_base.scss +100 -0
- data/vendor/assets/stylesheets/ustyle/articles/_guide.scss +57 -0
- data/vendor/assets/stylesheets/ustyle/articles/_more.scss +31 -0
- data/vendor/assets/stylesheets/ustyle/articles/_news.scss +213 -0
- data/vendor/assets/stylesheets/ustyle/articles/_related.scss +76 -0
- data/vendor/assets/stylesheets/ustyle/basics/_extends.scss +73 -0
- data/vendor/assets/stylesheets/ustyle/basics/_fonts.scss +27 -0
- data/vendor/assets/stylesheets/ustyle/basics/_functions.scss +78 -0
- data/vendor/assets/stylesheets/ustyle/basics/_grid.scss +86 -0
- data/vendor/assets/stylesheets/ustyle/basics/_typography.scss +123 -0
- data/vendor/assets/stylesheets/ustyle/basics/_variables.scss +166 -0
- data/vendor/assets/stylesheets/ustyle/basics/variables/_colors.scss +94 -0
- data/vendor/assets/stylesheets/ustyle/basics/variables/_forms.scss +98 -0
- data/vendor/assets/stylesheets/ustyle/basics/variables/_icons.scss +43 -0
- data/vendor/assets/stylesheets/ustyle/components/_backdrop.scss +23 -0
- data/vendor/assets/stylesheets/ustyle/components/_breadcrumbs.scss +66 -0
- data/vendor/assets/stylesheets/ustyle/components/_button.scss +187 -0
- data/vendor/assets/stylesheets/ustyle/components/_calculator.scss +41 -0
- data/vendor/assets/stylesheets/ustyle/components/_comp-table-row.scss +341 -0
- data/vendor/assets/stylesheets/ustyle/components/_compliance-banner.scss +38 -0
- data/vendor/assets/stylesheets/ustyle/components/_content-group.scss +33 -0
- data/vendor/assets/stylesheets/ustyle/components/_cta.scss +66 -0
- data/vendor/assets/stylesheets/ustyle/components/_grid-classes.scss +52 -0
- data/vendor/assets/stylesheets/ustyle/components/_hero.scss +115 -0
- data/vendor/assets/stylesheets/ustyle/components/_links.scss +26 -0
- data/vendor/assets/stylesheets/ustyle/components/_lists-li.scss +92 -0
- data/vendor/assets/stylesheets/ustyle/components/_lists.scss +39 -0
- data/vendor/assets/stylesheets/ustyle/components/_loader.scss +139 -0
- data/vendor/assets/stylesheets/ustyle/components/_overlay.scss +183 -0
- data/vendor/assets/stylesheets/ustyle/components/_progress.scss +138 -0
- data/vendor/assets/stylesheets/ustyle/components/_promo-banner.scss +131 -0
- data/vendor/assets/stylesheets/ustyle/components/_reminder.scss +87 -0
- data/vendor/assets/stylesheets/ustyle/components/_tab-navigation.scss +114 -0
- data/vendor/assets/stylesheets/ustyle/components/_table-toolbar.scss +91 -0
- data/vendor/assets/stylesheets/ustyle/components/_tabs.scss +300 -0
- data/vendor/assets/stylesheets/ustyle/components/_tooltip.scss +243 -0
- data/vendor/assets/stylesheets/ustyle/components/_usp.scss +88 -0
- data/vendor/assets/stylesheets/ustyle/content/_base.scss +227 -0
- data/vendor/assets/stylesheets/ustyle/content/_c-header.scss +27 -0
- data/vendor/assets/stylesheets/ustyle/content/_c-social.scss +9 -0
- data/vendor/assets/stylesheets/ustyle/content/_c-tabs.scss +30 -0
- data/vendor/assets/stylesheets/ustyle/forms/_base.scss +9 -0
- data/vendor/assets/stylesheets/ustyle/forms/_fields.scss +78 -0
- data/vendor/assets/stylesheets/ustyle/forms/_input-group.scss +154 -0
- data/vendor/assets/stylesheets/ustyle/forms/_input.scss +61 -0
- data/vendor/assets/stylesheets/ustyle/forms/_radio-checkbox.scss +144 -0
- data/vendor/assets/stylesheets/ustyle/forms/_reset.scss +21 -0
- data/vendor/assets/stylesheets/ustyle/forms/_select.scss +154 -0
- data/vendor/assets/stylesheets/ustyle/forms/_textarea.scss +33 -0
- data/vendor/assets/stylesheets/ustyle/forms/_toggle.scss +114 -0
- data/vendor/assets/stylesheets/ustyle/forms/_validation.scss +104 -0
- data/vendor/assets/stylesheets/ustyle/icons/_base.scss +241 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_arrow.scss +51 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_base.scss +7 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_baseline.scss +43 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_forms.scss +84 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_general.scss +24 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_link-colors.scss +44 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_media-query.scss +121 -0
- data/vendor/assets/stylesheets/ustyle/mixins/_typography.scss +98 -0
- data/vendor/assets/stylesheets/ustyle/tables/_base.scss +4 -0
- data/vendor/assets/stylesheets/ustyle/tables/_tables-basic.scss +72 -0
- data/vendor/assets/stylesheets/ustyle/tables/_tables-sortable.scss +72 -0
- data/vendor/assets/stylesheets/ustyle/tables/_tables-with-key-cells.scss +18 -0
- data/vendor/assets/stylesheets/ustyle/tables/_variables.scss +15 -0
- data/vendor/assets/stylesheets/ustyle/utilities/_general.scss +116 -0
- data/vendor/assets/stylesheets/ustyle/utilities/_grid.scss +13 -0
- data/vendor/assets/stylesheets/ustyle/utilities/_images.scss +34 -0
- data/vendor/assets/stylesheets/ustyle/utilities/_responsive.scss +101 -0
- data/vendor/assets/stylesheets/ustyle/utilities/_spacing.scss +73 -0
- data/vendor/assets/stylesheets/ustyle/vendor/normalize.scss +427 -0
- data/vendor/assets/stylesheets/ustyle-content.scss +2 -0
- data/vendor/assets/stylesheets/ustyle.scss +1 -0
- metadata +517 -0
@@ -0,0 +1,241 @@
|
|
1
|
+
// @page Design/Icons
|
2
|
+
// @name Icons
|
3
|
+
// @partial icons
|
4
|
+
//
|
5
|
+
// @description
|
6
|
+
// Our icons are displayed via `xlink:href` in the `<use>` tags. This allows us to directly embed SVGs in a flexible manner and be able to apply transformations and any sort of colours onto them.
|
7
|
+
// We use an SVG sprite called `icons.svg` that is versioned just like ustyle. As per the examples, the icons are referenced via the ID, like this: `icons.svg#icon-bookmark`
|
8
|
+
//
|
9
|
+
// **Accessibility**: In most cases, icons are purely presentational elements. In this scenario, you want to add: `aria-hidden="true"` and `role="presentation"` to your code.
|
10
|
+
//
|
11
|
+
// #### Usage
|
12
|
+
// * Suffixing with `--{size}` where size is one of *small*, *medium* or *large* will change the size of the icon from 16px, 32px and 64px respectively.
|
13
|
+
// * `.us-icon--{size}--sm-tablet` and `.us-icon--{size}--mobile` will override icon sizes for those screen size
|
14
|
+
// * `.us-icon--notext` allows you to set any element with no content to an icon
|
15
|
+
// * blue, typegrey, inputgrey, typecyan and custom are colors that can be set on the icon with `.us-icon--{color}`
|
16
|
+
// * Colors can be changed by adding your own `fill:` style to the SVG.
|
17
|
+
// * [svg4everybody.js](https://github.com/jonathantneal/svg4everybody) is needed for Internet Explorer browsers
|
18
|
+
//
|
19
|
+
// @state alarm
|
20
|
+
// @state android
|
21
|
+
// @state arrow-circle
|
22
|
+
// @state arrow-up
|
23
|
+
// @state arrow-down
|
24
|
+
// @state book
|
25
|
+
// @state bookmark
|
26
|
+
// @state breadcrumb
|
27
|
+
// @state calculator
|
28
|
+
// @state calendar
|
29
|
+
// @state car
|
30
|
+
// @state checkbox-tick
|
31
|
+
// @state chevron-right
|
32
|
+
// @state clock
|
33
|
+
// @state close
|
34
|
+
// @state cog
|
35
|
+
// @state credit-card
|
36
|
+
// @state cross
|
37
|
+
// @state dual-fuel
|
38
|
+
// @state electric-light
|
39
|
+
// @state envelope
|
40
|
+
// @state exit-noexit
|
41
|
+
// @state facebook
|
42
|
+
// @state facebook-brand
|
43
|
+
// @state filter
|
44
|
+
// @state fixed-variable
|
45
|
+
// @state gas
|
46
|
+
// @state gauge
|
47
|
+
// @state github
|
48
|
+
// @state google
|
49
|
+
// @state google-brand
|
50
|
+
// @state graph-up
|
51
|
+
// @state home
|
52
|
+
// @state hot
|
53
|
+
// @state info
|
54
|
+
// @state kettle
|
55
|
+
// @state key
|
56
|
+
// @state lock
|
57
|
+
// @state magnify-in
|
58
|
+
// @state magnify
|
59
|
+
// @state menu
|
60
|
+
// @state message
|
61
|
+
// @state mobile
|
62
|
+
// @state monthly-dd
|
63
|
+
// @state network
|
64
|
+
// @state no-exit
|
65
|
+
// @state pdf
|
66
|
+
// @state pencil
|
67
|
+
// @state person-add
|
68
|
+
// @state person
|
69
|
+
// @state phone
|
70
|
+
// @state piggy-bank
|
71
|
+
// @state pin
|
72
|
+
// @state pound-note
|
73
|
+
// @state present
|
74
|
+
// @state print
|
75
|
+
// @state quarterly-dd
|
76
|
+
// @state question-circle
|
77
|
+
// @state quote
|
78
|
+
// @state recycle
|
79
|
+
// @state remove
|
80
|
+
// @state renewable
|
81
|
+
// @state results
|
82
|
+
// @state save
|
83
|
+
// @state share
|
84
|
+
// @state shield
|
85
|
+
// @state sim
|
86
|
+
// @state smiley
|
87
|
+
// @state sort
|
88
|
+
// @state speech-circle
|
89
|
+
// @state speech
|
90
|
+
// @state spinner
|
91
|
+
// @state star-half
|
92
|
+
// @state star
|
93
|
+
// @state starline-half
|
94
|
+
// @state starline
|
95
|
+
// @state talk
|
96
|
+
// @state tick-circle
|
97
|
+
// @state tick
|
98
|
+
// @state tv
|
99
|
+
// @state twitter
|
100
|
+
// @state twitter-brand
|
101
|
+
// @state uswitch
|
102
|
+
// @state variable
|
103
|
+
// @state warning-circle
|
104
|
+
// @state wifi
|
105
|
+
// @state wiki
|
106
|
+
// @state xml
|
107
|
+
// @state play
|
108
|
+
// @state pound-circle
|
109
|
+
// @state dashcam
|
110
|
+
// @state warning
|
111
|
+
// @state chevron-left
|
112
|
+
// @state controller
|
113
|
+
//
|
114
|
+
// @markup
|
115
|
+
// <svg role="image" class="us-icon--medium us-icon--custom us-icon--{$modifiers}">
|
116
|
+
// <use xlink:href="/images/icons.svg#icon-{$modifiers}"></use>
|
117
|
+
// </svg>
|
118
|
+
|
119
|
+
@import "ustyle/basics/variables/icons";
|
120
|
+
|
121
|
+
/// Returns a background position for the number of `$icon-colors`
|
122
|
+
///
|
123
|
+
/// @group icons
|
124
|
+
/// @author David Annez
|
125
|
+
///
|
126
|
+
|
127
|
+
// scss-lint:disable QualifyingElement
|
128
|
+
|
129
|
+
// Overrides normalize.css
|
130
|
+
// Stops icon clipping in Firefox
|
131
|
+
svg:not(:root) {
|
132
|
+
overflow: visible;
|
133
|
+
}
|
134
|
+
|
135
|
+
svg.us-icon--before,
|
136
|
+
svg.us-icon--after {
|
137
|
+
display: inline-block;
|
138
|
+
vertical-align: middle;
|
139
|
+
}
|
140
|
+
|
141
|
+
svg.us-icon--before {
|
142
|
+
margin-right: $gutter-width/4;
|
143
|
+
}
|
144
|
+
|
145
|
+
svg.us-icon--after {
|
146
|
+
margin-left: $gutter-width/4;
|
147
|
+
}
|
148
|
+
|
149
|
+
.us-icon--centered {
|
150
|
+
position: relative;
|
151
|
+
top: 50%;
|
152
|
+
margin: 0 auto;
|
153
|
+
transform: translateY(-50%);
|
154
|
+
}
|
155
|
+
|
156
|
+
.us-icon--notext {
|
157
|
+
display: inline-block;
|
158
|
+
text-indent: -999em;
|
159
|
+
}
|
160
|
+
|
161
|
+
//
|
162
|
+
// ICON COLOURS
|
163
|
+
//
|
164
|
+
|
165
|
+
/// @require {Variable} icon-colors--svg
|
166
|
+
///
|
167
|
+
/// @require {Variable} icon-colors--svg--custom
|
168
|
+
|
169
|
+
@each $icon-color in $icon-colors--svg {
|
170
|
+
$color-name: nth($icon-color, 1);
|
171
|
+
$color-hex: nth($icon-color, 2);
|
172
|
+
|
173
|
+
svg.us-icon--#{$color-name} {
|
174
|
+
fill: $color-hex;
|
175
|
+
}
|
176
|
+
}
|
177
|
+
|
178
|
+
// SVG icon coloring for custom classes
|
179
|
+
|
180
|
+
@each $icon-colors-svg in $icon-colors--svg--custom {
|
181
|
+
$icon-name: nth($icon-colors-svg, 1);
|
182
|
+
$icon-fill: nth($icon-colors-svg, 2);
|
183
|
+
|
184
|
+
svg.us-icon--#{$icon-name} {
|
185
|
+
fill: $icon-fill;
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
// SVG icon coloring
|
190
|
+
|
191
|
+
@each $icon-color in $icon-colors--svg {
|
192
|
+
$color-name: nth($icon-color, 1);
|
193
|
+
$color-hex: nth($icon-color, 2);
|
194
|
+
|
195
|
+
svg.us-icon--hover--#{$color-name}:hover {
|
196
|
+
fill: $color-hex;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
// scss-lint:enable QualifyingElement
|
201
|
+
|
202
|
+
//
|
203
|
+
// ICON SIZING
|
204
|
+
//
|
205
|
+
|
206
|
+
@each $size in $icon-sizes {
|
207
|
+
$size-name: nth($size, 1);
|
208
|
+
$width: nth($size, 2);
|
209
|
+
$height: nth($size, 3);
|
210
|
+
|
211
|
+
.us-icon--#{$size-name} {
|
212
|
+
width: $width;
|
213
|
+
height: $height;
|
214
|
+
}
|
215
|
+
}
|
216
|
+
|
217
|
+
@include respond-to(to-small-tablet) {
|
218
|
+
@each $size in $icon-sizes {
|
219
|
+
$size-name: nth($size, 1);
|
220
|
+
$width: nth($size, 2);
|
221
|
+
$height: nth($size, 3);
|
222
|
+
|
223
|
+
.us-icon--#{$size-name}--sm-tablet {
|
224
|
+
width: $width;
|
225
|
+
height: $height;
|
226
|
+
}
|
227
|
+
}
|
228
|
+
}
|
229
|
+
|
230
|
+
@include respond-to(mobile) {
|
231
|
+
@each $size in $icon-sizes {
|
232
|
+
$size-name: nth($size, 1);
|
233
|
+
$width: nth($size, 2);
|
234
|
+
$height: nth($size, 3);
|
235
|
+
|
236
|
+
.us-icon--#{$size-name}--mobile {
|
237
|
+
width: $width;
|
238
|
+
height: $height;
|
239
|
+
}
|
240
|
+
}
|
241
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
/// Returns a CSS arrow generated by border styles
|
2
|
+
///
|
3
|
+
/// @author David Annez
|
4
|
+
///
|
5
|
+
/// @param {Number} $width [20px]
|
6
|
+
/// Horizontal width of triangle
|
7
|
+
///
|
8
|
+
/// @param {Number} $height [20px]
|
9
|
+
/// Vertical height of triangle
|
10
|
+
///
|
11
|
+
/// @param {String} $direction [up]
|
12
|
+
/// Direction of tip of arrow
|
13
|
+
///
|
14
|
+
/// @param {Color} $color [false]
|
15
|
+
/// Color of triangle, if none specified inherits from font color of element
|
16
|
+
|
17
|
+
@mixin arrow($width: 20px, $height: 20px, $direction: "up", $color: false) {
|
18
|
+
$border-style: solid;
|
19
|
+
$direction: $direction + unquote("");
|
20
|
+
|
21
|
+
@if $color {
|
22
|
+
$border-style: solid $color;
|
23
|
+
}
|
24
|
+
|
25
|
+
width: 0;
|
26
|
+
height: 0;
|
27
|
+
// Right
|
28
|
+
@if $direction == "right" {
|
29
|
+
border-top: $height / 2 solid transparent;
|
30
|
+
border-bottom: $height / 2 solid transparent;
|
31
|
+
border-left: $width $border-style;
|
32
|
+
}
|
33
|
+
// Left
|
34
|
+
@if $direction == "left" {
|
35
|
+
border-top: $height / 2 solid transparent;
|
36
|
+
border-right: $width $border-style;
|
37
|
+
border-bottom: $height / 2 solid transparent;
|
38
|
+
}
|
39
|
+
// Up
|
40
|
+
@if $direction == "up" or $direction == "top" {
|
41
|
+
border-right: $width / 2 solid transparent;
|
42
|
+
border-bottom: $height $border-style;
|
43
|
+
border-left: $width / 2 solid transparent;
|
44
|
+
}
|
45
|
+
// Down
|
46
|
+
@if $direction == "down" or $direction == "bottom" {
|
47
|
+
border-top: $height $border-style;
|
48
|
+
border-right: $width / 2 solid transparent;
|
49
|
+
border-left: $width / 2 solid transparent;
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
////
|
2
|
+
//// @group typography
|
3
|
+
////
|
4
|
+
|
5
|
+
/// Baseline mixin for cascading typographical elements. It calculates the adequate top and bottom
|
6
|
+
/// pushes for the selected font size and line height. Will vary from font to font, has been set to our
|
7
|
+
/// defaults
|
8
|
+
///
|
9
|
+
/// @param {Number (unit)} $font-size [$base-font-size]
|
10
|
+
/// The font size for the element
|
11
|
+
///
|
12
|
+
/// @param {Number (unit)} $line-height [$base-line-ratio]
|
13
|
+
/// The line height ratio
|
14
|
+
///
|
15
|
+
/// @param {Number (unit)} $scale [$base-scale]
|
16
|
+
/// Base scale for baseline
|
17
|
+
///
|
18
|
+
/// @param {Number (unit)} $cap-height [$base-cap-height]
|
19
|
+
/// The cap height of the font being used on the element
|
20
|
+
///
|
21
|
+
|
22
|
+
@mixin baseline($font-size: $base-font-size, $line-height: $base-line-ratio, $scale: $base-scale, $cap-height: $base-cap-height, $root: false) {
|
23
|
+
// rhythm unit
|
24
|
+
$rhythm: $line-height * $font-size / $scale;
|
25
|
+
// number of rhythm units that can fit the font-size
|
26
|
+
$lines: ceil(($font-size + .001px) / $rhythm);
|
27
|
+
// calculate the new line-height
|
28
|
+
$line-height: $rhythm * $lines / $font-size;
|
29
|
+
// use the results
|
30
|
+
font-size: $font-size;
|
31
|
+
font-size: rem($font-size);
|
32
|
+
line-height: $line-height;
|
33
|
+
$baseline-distance: ($line-height - $cap-height) / 2;
|
34
|
+
// if you use this mixin only on elements that have one direction margins
|
35
|
+
// http://csswizardry.com/2012/06/single-direction-margin-declarations/
|
36
|
+
// you can use this method with no worries.
|
37
|
+
@if $root != true {
|
38
|
+
padding-top: $baseline-distance * $base-font-size;
|
39
|
+
padding-top: $baseline-distance + rem;
|
40
|
+
margin-bottom: ($line-height - $baseline-distance) * $base-font-size;
|
41
|
+
margin-bottom: $line-height - $baseline-distance + rem;
|
42
|
+
}
|
43
|
+
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
/// Style placeholder attributes on form elements
|
2
|
+
///
|
3
|
+
/// @author Joe Green
|
4
|
+
|
5
|
+
@mixin placeholder($color) {
|
6
|
+
&::-webkit-input-placeholder {
|
7
|
+
color: $color;
|
8
|
+
}
|
9
|
+
|
10
|
+
&::-moz-placeholder {
|
11
|
+
color: $color;
|
12
|
+
opacity: 1;
|
13
|
+
}
|
14
|
+
|
15
|
+
&:-ms-input-placeholder {
|
16
|
+
color: $color;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
/// Conveniently style form input pseudo-classes for different form states
|
21
|
+
///
|
22
|
+
/// @author Joe Green
|
23
|
+
///
|
24
|
+
/// @param {Color} $color
|
25
|
+
/// The colour to be used for the form input's border and box-shadow
|
26
|
+
|
27
|
+
@mixin form-element-style($color, $color--hover: false, $color--active: false) {
|
28
|
+
border-color: $color;
|
29
|
+
|
30
|
+
&:hover {
|
31
|
+
border-color: if($color--hover, $color--hover, $color);
|
32
|
+
}
|
33
|
+
|
34
|
+
&:focus,
|
35
|
+
&:checked {
|
36
|
+
border-color: if($color--active, $color--active, $color);
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
/// Visually make disabled form inputs look like they can't be interacted with
|
41
|
+
///
|
42
|
+
/// @author Joe Green
|
43
|
+
///
|
44
|
+
/// @param {Color} $color [#ddd]
|
45
|
+
/// Foreground placeholder and border colour
|
46
|
+
///
|
47
|
+
/// @param {Color} $background-color [#fafafa]
|
48
|
+
/// Background colour of the form input
|
49
|
+
|
50
|
+
@mixin form-element-disabled($color: $c-form-element-disabled-fg, $background: $c-form-element-disabled-bg) {
|
51
|
+
@include form-element-style($c-form-element-disabled-border);
|
52
|
+
@include placeholder($color);
|
53
|
+
color: $color;
|
54
|
+
background-color: $background;
|
55
|
+
cursor: default;
|
56
|
+
|
57
|
+
&:focus {
|
58
|
+
@include placeholder($color);
|
59
|
+
box-shadow: none;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
/// Creates a larger version of a form input, allows us to set the styles
|
64
|
+
/// in a responsive manner
|
65
|
+
///
|
66
|
+
/// @author David Annez
|
67
|
+
/// @group Forms
|
68
|
+
///
|
69
|
+
/// @param {String} $input-size [base]
|
70
|
+
/// Name of the size used in the form element list
|
71
|
+
///
|
72
|
+
/// @param {List} $input-sizes [$form-element-sizes]
|
73
|
+
/// List of sizes to pass through. Should contain 4 values per item,
|
74
|
+
/// `(size-name, height, padding, font-size)`
|
75
|
+
|
76
|
+
@mixin input-sizing($input-size: base, $input-sizes: $form-element-sizes) {
|
77
|
+
@each $size in $input-sizes {
|
78
|
+
@if nth($size, 1) == $input-size {
|
79
|
+
height: nth($size, 2);
|
80
|
+
padding: nth($size, 3);
|
81
|
+
font-size: nth($size, 4);
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
/// Clearfix mixin - http://nicolasgallagher.com/micro-clearfix-hack/
|
2
|
+
///
|
3
|
+
/// @author Nicolas Gallagher
|
4
|
+
|
5
|
+
@mixin clearfix {
|
6
|
+
&:before,
|
7
|
+
&:after {
|
8
|
+
display: table;
|
9
|
+
content: " ";
|
10
|
+
}
|
11
|
+
|
12
|
+
&:after {
|
13
|
+
clear: both;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
@mixin hidpi($dpi: 2) {
|
18
|
+
@media
|
19
|
+
(-webkit-min-device-pixel-ratio: $dpi),
|
20
|
+
(min-device-pixel-ratio: $dpi),
|
21
|
+
(min-resolution: #{$dpi}dppx) {
|
22
|
+
@content;
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
/// Link colors mixin, inspired by Compass
|
2
|
+
/// https://github.com/Compass/compass/blob/stable/core/stylesheets/compass/typography/links/_link-colors.scss
|
3
|
+
///
|
4
|
+
/// @author Chris Eppstein
|
5
|
+
///
|
6
|
+
/// @param {String} $base-color
|
7
|
+
/// The starting color for the link element
|
8
|
+
///
|
9
|
+
/// @param {String} $hover [false]
|
10
|
+
/// The color for the :hover state of the element
|
11
|
+
///
|
12
|
+
/// @param {String} $active [false]
|
13
|
+
/// The color for the :active state of the element
|
14
|
+
///
|
15
|
+
/// @param {String} $visited [false]
|
16
|
+
/// The color for the :visited state of the element
|
17
|
+
///
|
18
|
+
/// @param {String} $focus [false]
|
19
|
+
/// The color for the :focus state of the element
|
20
|
+
///
|
21
|
+
|
22
|
+
@mixin link-colors($base-color, $hover: false, $active: false, $visited: false, $focus: false) {
|
23
|
+
color: $base-color;
|
24
|
+
@if $visited {
|
25
|
+
&:visited {
|
26
|
+
color: $visited;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
@if $focus {
|
30
|
+
&:focus {
|
31
|
+
color: $focus;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
@if $hover {
|
35
|
+
&:hover {
|
36
|
+
color: $hover;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
@if $active {
|
40
|
+
&:active {
|
41
|
+
color: $active;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
@@ -0,0 +1,121 @@
|
|
1
|
+
// --------------------------
|
2
|
+
// ! Respond to device mixins
|
3
|
+
// --------------------------
|
4
|
+
|
5
|
+
////
|
6
|
+
//// @author David Annez
|
7
|
+
//// @group media-queries
|
8
|
+
////
|
9
|
+
|
10
|
+
// ----------
|
11
|
+
// Legacy support
|
12
|
+
// ----------
|
13
|
+
|
14
|
+
/// IE8 is no longer supported, but on an opt-in basis for applications.
|
15
|
+
/// DEPRECATED: Set this to `true` if you do want .ie8 classes to be spat out for media queries
|
16
|
+
///
|
17
|
+
/// @type Bool
|
18
|
+
|
19
|
+
$media-query-legacy-support: false !default;
|
20
|
+
|
21
|
+
/// Breakpoint for extra large desktops
|
22
|
+
///
|
23
|
+
/// @type Number (unit)
|
24
|
+
|
25
|
+
$extra-large-desktop-width: 1600px !default;
|
26
|
+
|
27
|
+
/// Breakpoint for large desktops
|
28
|
+
///
|
29
|
+
/// @type Number (unit)
|
30
|
+
|
31
|
+
$large-desktop-width: 1200px !default;
|
32
|
+
|
33
|
+
/// Breakpoint for desktop
|
34
|
+
///
|
35
|
+
/// @type Number (unit)
|
36
|
+
|
37
|
+
$desktop-width: 992px !default;
|
38
|
+
|
39
|
+
/// Breakpoint for tablet
|
40
|
+
///
|
41
|
+
/// @type Number (unit)
|
42
|
+
|
43
|
+
$tablet-width: 768px !default;
|
44
|
+
|
45
|
+
/// Breakpoint for small tablets
|
46
|
+
///
|
47
|
+
/// @type Number (unit)
|
48
|
+
|
49
|
+
$small-tablet-width: 600px !default;
|
50
|
+
|
51
|
+
/// Breakpoint for mobile
|
52
|
+
///
|
53
|
+
/// @type Number (unit)
|
54
|
+
|
55
|
+
$mobile-width: 480px !default;
|
56
|
+
|
57
|
+
/// Max-breakpoint for mobiles
|
58
|
+
///
|
59
|
+
/// @require {variable} small-tablet-width
|
60
|
+
/// @type Number (unit)
|
61
|
+
|
62
|
+
$mobile-end-width: $small-tablet-width - 1;
|
63
|
+
|
64
|
+
/// Max-breakpoint for small tablets
|
65
|
+
///
|
66
|
+
/// @require {variable} tablet-width
|
67
|
+
/// @type Number (unit)
|
68
|
+
|
69
|
+
$small-tablet-end-width: $tablet-width - 1;
|
70
|
+
|
71
|
+
/// Max-breakpoint for tablets
|
72
|
+
///
|
73
|
+
/// @require {variable} desktop-width
|
74
|
+
/// @type Number (unit)
|
75
|
+
|
76
|
+
$tablet-end-width: $desktop-width - 1;
|
77
|
+
|
78
|
+
/// A list containing the devices for `min-width` media-query breakpoints
|
79
|
+
///
|
80
|
+
/// @type List
|
81
|
+
|
82
|
+
$min-breakpoints: (small-tablet, $small-tablet-width), (tablet, $tablet-width), (desktop, $desktop-width), (large-desktop, $large-desktop-width), (extra-large-desktop, $extra-large-desktop-width) !default;
|
83
|
+
|
84
|
+
/// A list containing the devices for `max-width` media-query breakpoints
|
85
|
+
///
|
86
|
+
/// @type List
|
87
|
+
|
88
|
+
$max-breakpoints: (mobile, $mobile-end-width), (to-small-tablet, $small-tablet-end-width), (to-tablet, $tablet-end-width) !default;
|
89
|
+
|
90
|
+
$devices: ();
|
91
|
+
|
92
|
+
@each $breakpoint in $min-breakpoints {
|
93
|
+
$devices: append($devices, (nth($breakpoint, 1), min, nth($breakpoint, 2)), comma);
|
94
|
+
}
|
95
|
+
|
96
|
+
@each $breakpoint in $max-breakpoints {
|
97
|
+
$devices: append($devices, (nth($breakpoint, 1), max, nth($breakpoint, 2)), comma);
|
98
|
+
}
|
99
|
+
|
100
|
+
/// Output a media query block for the targeted device and a potential internet explorer fallback
|
101
|
+
///
|
102
|
+
/// @param {String} $device
|
103
|
+
/// The device to match up the media query with. Can be one from the list of `$min-breakpoints` (`small-tablet`, `tablet`, `desktop` etc.)
|
104
|
+
/// or `$max-breakpoints` (`mobile`, `to-small-tablet`, `to-tablet`)
|
105
|
+
///
|
106
|
+
/// @param {Bool} $ie-fallback [false]
|
107
|
+
/// DEPRECATED: If set to `true` will return a `.ie8` {content} fallback to ensure IE8 gets the supporting styling
|
108
|
+
///
|
109
|
+
/// @param {Bool} $ie-fallback-noherit [false]
|
110
|
+
/// DEPRECCATED: If attaching the mixin onto the root, then set this to `true` to ensure Sass builds the correct styles
|
111
|
+
///
|
112
|
+
|
113
|
+
@mixin respond-to($device, $ie-fallback: false, $ie-fallback-noherit: false) {
|
114
|
+
@each $listed-device in $devices {
|
115
|
+
@if nth($listed-device, 1) == $device {
|
116
|
+
@media screen and (#{unquote("#{nth($listed-device, 2)}-width:") nth($listed-device, 3)}) {
|
117
|
+
@content;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
}
|
121
|
+
}
|