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,300 @@
|
|
1
|
+
// @page Pattern Library/JavaScript
|
2
|
+
// @name Tabs
|
3
|
+
//
|
4
|
+
// @description
|
5
|
+
// These are the basic tabs used for landing pages. You can either reference a data-target for the urls or href for the target tabs. They have a non-js fallback and fold over to accordion when in small tablet view. They are initialised on page load if the tabs classes exist.
|
6
|
+
//
|
7
|
+
// @javascript
|
8
|
+
// var tabs = new Tabs({
|
9
|
+
// tabContainer: ".us-tabs",
|
10
|
+
// tabLinks: ".us-tabs-nav-mainlink",
|
11
|
+
// tabTitle: "us-tab-title",
|
12
|
+
// activeClass: "active",
|
13
|
+
// changeUrls: true,
|
14
|
+
// collapsible: true,
|
15
|
+
// autoScroll: false
|
16
|
+
// });
|
17
|
+
//
|
18
|
+
// @markup
|
19
|
+
// <div class='us-tabs'>
|
20
|
+
// <nav class='us-tabs-nav'>
|
21
|
+
// <div class='us-tabs-nav-wrapper'>
|
22
|
+
// <div class='us-tabs-nav-menu'>
|
23
|
+
// <a class="us-tabs-nav-mainlink us-tabs-nav-link" href="#tab1">Tab 1</a>
|
24
|
+
// <a class="us-tabs-nav-mainlink us-tabs-nav-link" href="#tab2">Tab 2</a>
|
25
|
+
// <a class="us-tabs-nav-mainlink us-tabs-nav-link" href="#tab3">Tab 3</a>
|
26
|
+
// </div>
|
27
|
+
// </div>
|
28
|
+
// </nav>
|
29
|
+
// <div class='us-tabs-container'>
|
30
|
+
// <div class='us-tab' id='tab1'>
|
31
|
+
// <h2 class='us-tab-title'>
|
32
|
+
// <a class="us-tabs-nav-mainlink" href="#tab1">
|
33
|
+
// Test 1
|
34
|
+
// <svg role="presentation" aria-hidden="true" class="us-tabs-nav-chevron us-icon us-icon--small us-icon--after us-icon--inputgrey"><use xlink:href="/images/icons.svg#icon-chevron-right"/></svg>
|
35
|
+
// </a>
|
36
|
+
// </h2>
|
37
|
+
// <div class='us-tab-content'>
|
38
|
+
// <p>Fatback capicola leberkas pork loin pork jowl. Meatloaf shoulder pancetta, salami prosciutto ribeye andouille chuck landjaeger short loin filet mignon sirloin. Pork chop tri-tip ham pork hamburger frankfurter leberkas short ribs biltong. Prosciutto ham hock rump, andouille tongue flank sirloin tri-tip ball tip frankfurter ham drumstick meatloaf pork loin.</p>
|
39
|
+
// </div>
|
40
|
+
// </div>
|
41
|
+
// <div class='us-tab' id='tab2'>
|
42
|
+
// <h2 class='us-tab-title'>
|
43
|
+
// <a class="us-tabs-nav-mainlink" href="#tab2">
|
44
|
+
// Test 2
|
45
|
+
// <svg role="presentation" aria-hidden="true" class="us-tabs-nav-chevron us-icon us-icon--small us-icon--after us-icon--inputgrey"><use xlink:href="/images/icons.svg#icon-chevron-right"/></svg>
|
46
|
+
// </a>
|
47
|
+
// </h2>
|
48
|
+
// <div class='us-tab-content'>
|
49
|
+
// <p>Kielbasa tenderloin spare ribs, andouille doner brisket chuck drumstick bresaola short loin pork t-bone ground round jowl. Ball tip pork loin doner tongue filet mignon biltong hamburger leberkas. Filet mignon kielbasa kevin short ribs, drumstick chuck shankle spare ribs tri-tip.</p>
|
50
|
+
// </div>
|
51
|
+
// </div>
|
52
|
+
// <div class='us-tab' id='tab3'>
|
53
|
+
// <h2 class='us-tab-title'>
|
54
|
+
// <a class="us-tabs-nav-mainlink" href="#tab3">
|
55
|
+
// Test 3
|
56
|
+
// <svg role="presentation" aria-hidden="true" class="us-tabs-nav-chevron us-icon us-icon--small us-icon--after us-icon--inputgrey"><use xlink:href="/images/icons.svg#icon-chevron-right"/></svg>
|
57
|
+
// </a>
|
58
|
+
// </h2>
|
59
|
+
// <div class='us-tab-content'>
|
60
|
+
// <p>Pig pastrami pork loin kielbasa, filet mignon meatloaf short ribs tenderloin. Pork loin leberkas kevin fatback porchetta bresaola. Cow rump shoulder pastrami. Andouille pork belly t-bone short ribs brisket. Bresaola pork belly tail salami capicola meatball. Pork belly beef ham landjaeger.</p>
|
61
|
+
// </div>
|
62
|
+
// </div>
|
63
|
+
// </div>
|
64
|
+
// </div>
|
65
|
+
|
66
|
+
$tab-width: col-width(2) !default;
|
67
|
+
$tab-border-color: #fff;
|
68
|
+
$tab-active-color: $tab-border-color;
|
69
|
+
|
70
|
+
@keyframes tab-show {
|
71
|
+
0% {
|
72
|
+
opacity: 0;
|
73
|
+
}
|
74
|
+
|
75
|
+
100% {
|
76
|
+
opacity: 1;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
// Tab nav
|
81
|
+
.us-tabs-nav {
|
82
|
+
display: none;
|
83
|
+
background-color: $c-super-light-grey;
|
84
|
+
|
85
|
+
@include respond-to(tablet) {
|
86
|
+
.js & {
|
87
|
+
display: block;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
@if $media-query-legacy-support {
|
92
|
+
.js.ie8 & {
|
93
|
+
display: block;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
.us-tabs-nav-wrapper {
|
99
|
+
@extend %container;
|
100
|
+
}
|
101
|
+
|
102
|
+
.us-tabs-nav-menu {
|
103
|
+
display: table;
|
104
|
+
display: -webkit-flex;
|
105
|
+
display: flex;
|
106
|
+
width: 100%;
|
107
|
+
overflow: hidden;
|
108
|
+
flex-flow: row;
|
109
|
+
}
|
110
|
+
|
111
|
+
.us-tabs-nav-link {
|
112
|
+
display: table-cell;
|
113
|
+
width: $tab-width;
|
114
|
+
padding: 14px 1em 12px;
|
115
|
+
text-align: center;
|
116
|
+
vertical-align: middle;
|
117
|
+
border-right: 3px solid $tab-border-color;
|
118
|
+
border-radius: 0;
|
119
|
+
transition: none;
|
120
|
+
text-decoration: none;
|
121
|
+
|
122
|
+
@include respond-to(tablet) {
|
123
|
+
font-size: em(14px);
|
124
|
+
line-height: 1.25em;
|
125
|
+
}
|
126
|
+
|
127
|
+
@include respond-to(desktop) {
|
128
|
+
font-size: em($base-font-size);
|
129
|
+
}
|
130
|
+
|
131
|
+
@include respond-to(large-desktop) {
|
132
|
+
font-size: em(18px);
|
133
|
+
}
|
134
|
+
|
135
|
+
&:last-child {
|
136
|
+
border-right: 0;
|
137
|
+
}
|
138
|
+
|
139
|
+
&:hover,
|
140
|
+
&.active {
|
141
|
+
color: $c-uswitch-navy;
|
142
|
+
border-right: 0;
|
143
|
+
|
144
|
+
&:before {
|
145
|
+
background-color: $c-uswitch-navy;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
&.active {
|
150
|
+
cursor: default;
|
151
|
+
background-color: $tab-active-color;
|
152
|
+
|
153
|
+
&:hover {
|
154
|
+
background-color: $tab-active-color;
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
.us-tabs-nav-mainlink {
|
160
|
+
@include link-colors($c-darker-grey, $c-uswitch-navy, $c-uswitch-navy, $c-darker-grey);
|
161
|
+
position: relative;
|
162
|
+
background-color: $c-super-light-grey;
|
163
|
+
transition: color 300ms, background-color 300ms;
|
164
|
+
|
165
|
+
&:before {
|
166
|
+
position: absolute;
|
167
|
+
top: 0;
|
168
|
+
right: 0;
|
169
|
+
left: 0;
|
170
|
+
height: 5px;
|
171
|
+
background-color: $c-super-light-grey;
|
172
|
+
content: "";
|
173
|
+
transition: background-color 300ms;
|
174
|
+
}
|
175
|
+
|
176
|
+
&:hover {
|
177
|
+
background-color: #f4f5f6;
|
178
|
+
}
|
179
|
+
|
180
|
+
&:hover .us-tabs-nav-chevron,
|
181
|
+
&:hover .us-tabs-nav-chevron-wrapper .us-icon,
|
182
|
+
.us-tab.active & .us-tabs-nav-chevron,
|
183
|
+
.us-tab.active & .us-tabs-nav-chevron-wrapper .us-icon {
|
184
|
+
transform: rotate(-90deg);
|
185
|
+
fill: $c-uswitch-navy;
|
186
|
+
}
|
187
|
+
|
188
|
+
&:hover:before {
|
189
|
+
background-color: $c-uswitch-navy;
|
190
|
+
}
|
191
|
+
}
|
192
|
+
|
193
|
+
.us-tab.active {
|
194
|
+
.us-tabs-nav-mainlink:before {
|
195
|
+
background-color: $c-uswitch-navy;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
|
199
|
+
// scss-lint:disable Comment, MergeableSelector
|
200
|
+
.us-tabs-nav-link {
|
201
|
+
/* autoprefixer: off */
|
202
|
+
display: -webkit-box;
|
203
|
+
display: -ms-flexbox;
|
204
|
+
display: flex;
|
205
|
+
-webkit-box-align: center;
|
206
|
+
-webkit-box-pack: center;
|
207
|
+
-webkit-justify-content: center;
|
208
|
+
justify-content: center;
|
209
|
+
-ms-flex-align: center;
|
210
|
+
-ms-flex-pack: center;
|
211
|
+
-webkit-align-items: center;
|
212
|
+
align-items: center;
|
213
|
+
}
|
214
|
+
// scss-lint:enable Comment, MergeableSelector
|
215
|
+
|
216
|
+
// Tabs
|
217
|
+
.us-tabs-container {
|
218
|
+
@extend %container;
|
219
|
+
|
220
|
+
@include respond-to(to-tablet) {
|
221
|
+
padding: 0;
|
222
|
+
}
|
223
|
+
}
|
224
|
+
|
225
|
+
.us-tab-title {
|
226
|
+
@include heading(4);
|
227
|
+
position: relative;
|
228
|
+
margin: 0;
|
229
|
+
font-weight: normal;
|
230
|
+
border-bottom: 1px solid #fff;
|
231
|
+
|
232
|
+
@include respond-to(tablet) {
|
233
|
+
.js & {
|
234
|
+
display: none;
|
235
|
+
}
|
236
|
+
}
|
237
|
+
|
238
|
+
@if $media-query-legacy-support {
|
239
|
+
.js.ie8 & {
|
240
|
+
display: none;
|
241
|
+
}
|
242
|
+
}
|
243
|
+
|
244
|
+
.us-tabs-nav-mainlink {
|
245
|
+
display: block;
|
246
|
+
padding: .75em ($gutter-width / 2) .5em;
|
247
|
+
|
248
|
+
.us-tab.active & {
|
249
|
+
color: $c-uswitch-navy;
|
250
|
+
background-color: $tab-active-color;
|
251
|
+
}
|
252
|
+
}
|
253
|
+
|
254
|
+
.us-tabs-nav-chevron,
|
255
|
+
.us-tabs-nav-chevron-wrapper .us-icon {
|
256
|
+
position: absolute;
|
257
|
+
right: ($gutter-width / 2);
|
258
|
+
transform: rotate(90deg);
|
259
|
+
transition: transform .2s ease;
|
260
|
+
}
|
261
|
+
}
|
262
|
+
|
263
|
+
.us-tab-content {
|
264
|
+
display: block;
|
265
|
+
overflow: hidden;
|
266
|
+
opacity: 1;
|
267
|
+
|
268
|
+
@include respond-to(to-tablet) {
|
269
|
+
padding-right: ($gutter-width / 2);
|
270
|
+
padding-left: ($gutter-width / 2);
|
271
|
+
}
|
272
|
+
|
273
|
+
.js & {
|
274
|
+
max-height: 0;
|
275
|
+
|
276
|
+
@include respond-to(tablet) {
|
277
|
+
display: none;
|
278
|
+
max-height: none;
|
279
|
+
}
|
280
|
+
}
|
281
|
+
|
282
|
+
@if $media-query-legacy-support {
|
283
|
+
.ie8.js & {
|
284
|
+
display: none;
|
285
|
+
max-height: none;
|
286
|
+
}
|
287
|
+
}
|
288
|
+
|
289
|
+
.us-tab.active & {
|
290
|
+
max-height: 9999px;
|
291
|
+
padding-top: 1em;
|
292
|
+
|
293
|
+
@include respond-to(tablet, true) {
|
294
|
+
display: block;
|
295
|
+
animation-duration: 1s;
|
296
|
+
animation-name: tab-show;
|
297
|
+
animation-fill-mode: forwards;
|
298
|
+
}
|
299
|
+
}
|
300
|
+
}
|
@@ -0,0 +1,243 @@
|
|
1
|
+
// @page Pattern Library/JavaScript
|
2
|
+
// @name Tooltip
|
3
|
+
//
|
4
|
+
// @description
|
5
|
+
// `.us-tooltip` can be applied to any parent, and by hovering over it, it will toggle the visibility of `.us-tooltip__note`. Please note that on mobile viewports, the tooltip will appeat underneath the element that is aligned with the tooltip icon.
|
6
|
+
//
|
7
|
+
// @state .us-tooltip--top
|
8
|
+
// @state .us-tooltip--bottom
|
9
|
+
// @state .us-tooltip--left
|
10
|
+
// @state .us-tooltip--right
|
11
|
+
// @state .us-tooltip--small
|
12
|
+
//
|
13
|
+
// @javascript
|
14
|
+
// var tooltips = new ClassToggler({
|
15
|
+
// containerClass: '.us-tooltip',
|
16
|
+
// $target: $('.us-tooltip__icon'),
|
17
|
+
// activeClass: "us-tooltip--active"
|
18
|
+
// });
|
19
|
+
//
|
20
|
+
// @markup
|
21
|
+
// <div class="tooltip-demo us-tooltip {$modifiers}">
|
22
|
+
// <div class="us-field">
|
23
|
+
// <label for='name'>Name</label>
|
24
|
+
// <input class='us-form-input' id='name' name='name' placeholder='Please enter your name'>
|
25
|
+
// </div>
|
26
|
+
//
|
27
|
+
// <div class="us-tooltip__wrapper">
|
28
|
+
// <div class="us-tooltip__icon"></div>
|
29
|
+
// <div class="us-tooltip__note">
|
30
|
+
// <div class="us-tooltip__arrow"></div>
|
31
|
+
// <strong>Tooltip</strong> message content
|
32
|
+
// </div>
|
33
|
+
// </div>
|
34
|
+
// </div>
|
35
|
+
|
36
|
+
$tooltip-note-width: 300px !default;
|
37
|
+
$tooltip-icon-size: 22px !default;
|
38
|
+
$tooltip-icon-size--small: 16px !default;
|
39
|
+
$tooltip-icon-bg-color: $c-grey !default;
|
40
|
+
$tooltip-icon-top-position: 0 !default;
|
41
|
+
$tooltip-icon-right-position: 0 !default;
|
42
|
+
|
43
|
+
$tooltip-note-padding-vertical: 1em !default;
|
44
|
+
$tooltip-note-padding-horizontal: .75em !default;
|
45
|
+
$tooltip-note-bg-color: #fff !default;
|
46
|
+
$tooltip-note-border-color: $c-uswitch-navy !default;
|
47
|
+
|
48
|
+
$tooltip-arrow-width: 10px !default;
|
49
|
+
$tooltip-arrow-height: $tooltip-arrow-width * 2 !default;
|
50
|
+
|
51
|
+
$tooltip-hover: true !default;
|
52
|
+
$tooltip-active-class-breakpoint: to-tablet !default;
|
53
|
+
$tooltip-default-breakpoint: tablet !default;
|
54
|
+
|
55
|
+
$tooltip-h-positions: "top", "bottom";
|
56
|
+
$tooltip-v-positions: "left", "right";
|
57
|
+
|
58
|
+
@mixin tooltip-arrow($arrow-type, $arrow-width, $arrow-height, $arrow-position, $bottom-position) {
|
59
|
+
.us-tooltip__arrow {
|
60
|
+
@include respond-to($tooltip-default-breakpoint) {
|
61
|
+
@include arrow($arrow-width, $arrow-height, $arrow-type, $tooltip-note-border-color);
|
62
|
+
#{$arrow-position}: $bottom-position;
|
63
|
+
|
64
|
+
&:after {
|
65
|
+
@include arrow($arrow-width, $arrow-height, $arrow-type, $tooltip-note-bg-color);
|
66
|
+
#{$arrow-position}: 1px;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
%tooltip-vertical-defaults {
|
73
|
+
@include respond-to($tooltip-default-breakpoint, true) {
|
74
|
+
top: -$tooltip-note-padding-vertical;
|
75
|
+
|
76
|
+
.us-tooltip__arrow {
|
77
|
+
top: $tooltip-note-padding-vertical;
|
78
|
+
}
|
79
|
+
|
80
|
+
.us-tooltip__arrow:after {
|
81
|
+
top: -$tooltip-arrow-width;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
%tooltip-horizontal-defaults {
|
87
|
+
@include respond-to($tooltip-default-breakpoint, true) {
|
88
|
+
left: 50%;
|
89
|
+
margin-left: - ($tooltip-note-width / 2);
|
90
|
+
|
91
|
+
.us-tooltip__arrow,
|
92
|
+
.us-tooltip__arrow:after {
|
93
|
+
left: 50%;
|
94
|
+
margin-left: -$tooltip-arrow-height/2;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
@mixin tooltip-position--horizontal($position, $icon-size: $tooltip-icon-size, $arrow-height: $tooltip-arrow-width, $arrow-width: $tooltip-arrow-height) {
|
100
|
+
$px-position: $icon-size + $arrow-height;
|
101
|
+
$bottom-position: -($arrow-width / 2);
|
102
|
+
$arrow-type: opposite-direction($position);
|
103
|
+
$arrow-position: opposite-direction($position);
|
104
|
+
|
105
|
+
@extend %tooltip-horizontal-defaults;
|
106
|
+
@include tooltip-arrow($arrow-type, $arrow-width, $arrow-height, $arrow-position, $bottom-position);
|
107
|
+
#{opposite-direction($position)}: $px-position;
|
108
|
+
}
|
109
|
+
|
110
|
+
@mixin tooltip-position--vertical($position, $icon-size: $tooltip-icon-size, $arrow-height: $tooltip-arrow-height, $arrow-width: $tooltip-arrow-width) {
|
111
|
+
$arrow-type: opposite-direction($position);
|
112
|
+
$arrow-position: $arrow-type;
|
113
|
+
$bottom-position: -($arrow-height / 2);
|
114
|
+
$px-position: -($tooltip-note-width + ($icon-size / 2)) - 4;
|
115
|
+
|
116
|
+
@extend %tooltip-vertical-defaults;
|
117
|
+
@include tooltip-arrow($arrow-type, $arrow-width, $arrow-height, $arrow-position, $bottom-position);
|
118
|
+
#{$position}: $px-position;
|
119
|
+
}
|
120
|
+
|
121
|
+
@mixin tooltip--active {
|
122
|
+
.us-tooltip__note {
|
123
|
+
display: block;
|
124
|
+
pointer-events: all;
|
125
|
+
opacity: 1;
|
126
|
+
visibility: visible;
|
127
|
+
transition-delay: 0ms;
|
128
|
+
}
|
129
|
+
|
130
|
+
.us-tooltip__icon {
|
131
|
+
background: $c-uswitch-navy;
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
.us-tooltip {
|
136
|
+
&.us-tooltip--active {
|
137
|
+
@if $tooltip-active-class-breakpoint {
|
138
|
+
@include respond-to($tooltip-active-class-breakpoint) {
|
139
|
+
@include tooltip--active;
|
140
|
+
}
|
141
|
+
} @else {
|
142
|
+
@include tooltip--active;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
@if $tooltip-hover {
|
147
|
+
&:hover {
|
148
|
+
@include respond-to($tooltip-default-breakpoint, true) {
|
149
|
+
@include tooltip--active;
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
.us-tooltip__wrapper {
|
156
|
+
position: static;
|
157
|
+
top: 0;
|
158
|
+
right: 0;
|
159
|
+
|
160
|
+
@include respond-to($tooltip-default-breakpoint, true) {
|
161
|
+
position: absolute;
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
.us-tooltip__icon {
|
166
|
+
position: absolute;
|
167
|
+
top: $tooltip-icon-top-position;
|
168
|
+
right: $tooltip-icon-right-position;
|
169
|
+
width: $tooltip-icon-size;
|
170
|
+
height: $tooltip-icon-size;
|
171
|
+
font-weight: 700;
|
172
|
+
line-height: $tooltip-icon-size;
|
173
|
+
color: #fff;
|
174
|
+
text-align: center;
|
175
|
+
cursor: pointer;
|
176
|
+
background: $tooltip-icon-bg-color;
|
177
|
+
border-radius: 50%;
|
178
|
+
|
179
|
+
@include respond-to($tooltip-default-breakpoint, true) {
|
180
|
+
position: static;
|
181
|
+
}
|
182
|
+
|
183
|
+
&:before {
|
184
|
+
content: "?";
|
185
|
+
}
|
186
|
+
}
|
187
|
+
|
188
|
+
.us-tooltip__note {
|
189
|
+
position: static;
|
190
|
+
display: none;
|
191
|
+
padding: $tooltip-note-padding-horizontal $tooltip-note-padding-vertical;
|
192
|
+
margin-top: 1em;
|
193
|
+
margin-bottom: 1em;
|
194
|
+
color: $c-uswitch-navy;
|
195
|
+
background: $tooltip-note-bg-color;
|
196
|
+
border: 1px solid $tooltip-note-border-color;
|
197
|
+
|
198
|
+
@include respond-to($tooltip-default-breakpoint, true) {
|
199
|
+
position: absolute;
|
200
|
+
display: block;
|
201
|
+
width: $tooltip-note-width;
|
202
|
+
margin-top: 0;
|
203
|
+
margin-bottom: 0;
|
204
|
+
pointer-events: none;
|
205
|
+
opacity: 0;
|
206
|
+
visibility: hidden;
|
207
|
+
transition: visibility 0ms ease 300ms, opacity 300ms ease;
|
208
|
+
}
|
209
|
+
}
|
210
|
+
|
211
|
+
.us-tooltip__arrow {
|
212
|
+
position: absolute;
|
213
|
+
|
214
|
+
&:after {
|
215
|
+
position: absolute;
|
216
|
+
content: "";
|
217
|
+
}
|
218
|
+
}
|
219
|
+
|
220
|
+
.us-tooltip--small {
|
221
|
+
.us-tooltip__icon {
|
222
|
+
width: $tooltip-icon-size--small;
|
223
|
+
height: $tooltip-icon-size--small;
|
224
|
+
font-size: .875em;
|
225
|
+
line-height: $tooltip-icon-size--small;
|
226
|
+
}
|
227
|
+
}
|
228
|
+
|
229
|
+
@each $position in $tooltip-h-positions {
|
230
|
+
.us-tooltip--#{$position} {
|
231
|
+
.us-tooltip__note {
|
232
|
+
@include tooltip-position--horizontal($position);
|
233
|
+
}
|
234
|
+
}
|
235
|
+
}
|
236
|
+
|
237
|
+
@each $position in $tooltip-v-positions {
|
238
|
+
.us-tooltip--#{$position} {
|
239
|
+
.us-tooltip__note {
|
240
|
+
@include tooltip-position--vertical($position);
|
241
|
+
}
|
242
|
+
}
|
243
|
+
}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
// @page Pattern Library/Components
|
2
|
+
// @name USPs
|
3
|
+
//
|
4
|
+
// @description
|
5
|
+
// USPs (Unique Selling Points) are used within tables and on splash pages to highlight offers within a deal, and also to differentiate deals.
|
6
|
+
// General guidelines; There should only be one USP per deal. Text within USPs should be written in sentence case (not uppercase).
|
7
|
+
//
|
8
|
+
// @state .us-usp--blue - uSwitch related.
|
9
|
+
// @state .us-usp--orange - Rewards (money/points).
|
10
|
+
// @state .us-usp--purple - Gifts eg. free TV.
|
11
|
+
// @state .us-usp--yellow - Vouchers.
|
12
|
+
// @state .us-usp--typecyan - Micro persuasions eg. most popular, half price.
|
13
|
+
// @state .us-usp--green - Renewable and environmentally friendly.
|
14
|
+
// @state .us-usp--navy - Generic vertical specific USP.
|
15
|
+
// @state .us-usp--cyan - Generic vertical specific USP.
|
16
|
+
// @state .us-usp--typegrey - Generic vertical specific USP.
|
17
|
+
// @state .us-usp--red - Generic vertical specific USP.
|
18
|
+
//
|
19
|
+
// @markup
|
20
|
+
// <div class='us-usp {$modifiers}'>Unique Selling Point</div>
|
21
|
+
// <div class='us-usp us-usp--annotated'>
|
22
|
+
// <div class='us-usp {$modifiers}'>Annotated USP</div>
|
23
|
+
// More information about USP goes here
|
24
|
+
// </div>
|
25
|
+
|
26
|
+
$variants: (
|
27
|
+
('blue', $c-dark-blue),
|
28
|
+
('orange', $c-dark-orange),
|
29
|
+
('purple', $c-dark-purple),
|
30
|
+
('yellow', $c-dark-yellow),
|
31
|
+
('typecyan', $c-light-blue),
|
32
|
+
('green', $c-dark-green),
|
33
|
+
('navy', $c-dark-blue),
|
34
|
+
('cyan', $c-light-blue),
|
35
|
+
('typegrey', $c-darker-grey),
|
36
|
+
('grey', $c-darker-grey),
|
37
|
+
('red', $c-light-red),
|
38
|
+
('pink', $c-dark-pink),
|
39
|
+
('light-purple', $c-light-purple)
|
40
|
+
) !default;
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
@mixin usp-style($colour) {
|
45
|
+
background-color: rgba(nth($colour, 2), .3);
|
46
|
+
|
47
|
+
&:before {
|
48
|
+
position: relative;
|
49
|
+
left: -.55em;
|
50
|
+
border-left: 4px solid nth($colour, 2);
|
51
|
+
content: "";
|
52
|
+
padding: .2em 0;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
.us-usp {
|
57
|
+
@include usp-style(('blue', $c-dark-blue));
|
58
|
+
|
59
|
+
display: inline-block;
|
60
|
+
padding: .25em .75em;
|
61
|
+
font-weight: 600;
|
62
|
+
font-size: .875em;
|
63
|
+
line-height: $base-line-ratio;
|
64
|
+
color: $c-uswitch-navy;
|
65
|
+
text-align: left;
|
66
|
+
}
|
67
|
+
|
68
|
+
@each $colour in $variants {
|
69
|
+
.us-usp--#{nth($colour, 1)} {
|
70
|
+
@include usp-style($colour);
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
.us-usp--annotated {
|
75
|
+
font-weight: normal;
|
76
|
+
color: $c-typegrey;
|
77
|
+
text-align: left;
|
78
|
+
background-color: $c-bggrey;
|
79
|
+
|
80
|
+
&:before {
|
81
|
+
border: 0;
|
82
|
+
}
|
83
|
+
|
84
|
+
.us-usp {
|
85
|
+
margin-right: 10px;
|
86
|
+
margin-left: -10px;
|
87
|
+
}
|
88
|
+
}
|