Repository: thoughtbot/bourbon
Branch: main
Commit: 1cd55ce9c0f1
Files: 163
Total size: 136.5 KB
Directory structure:
gitextract_vs77nx0t/
├── .circleci/
│ └── config.yml
├── .github/
│ ├── ISSUE_TEMPLATE.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── dynamic-readme.yml
│ └── dynamic-security.yml
├── .gitignore
├── .hound.yml
├── .npmignore
├── .stylelintrc.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Gemfile
├── LICENSE.md
├── README.md
├── RELEASING.md
├── Rakefile
├── SECURITY.md
├── bin/
│ └── bourbon
├── bourbon.gemspec
├── core/
│ ├── _bourbon.scss
│ └── bourbon/
│ ├── helpers/
│ │ ├── _buttons-list.scss
│ │ ├── _scales.scss
│ │ └── _text-inputs-list.scss
│ ├── library/
│ │ ├── _border-color.scss
│ │ ├── _border-radius.scss
│ │ ├── _border-style.scss
│ │ ├── _border-width.scss
│ │ ├── _buttons.scss
│ │ ├── _clearfix.scss
│ │ ├── _contrast-switch.scss
│ │ ├── _ellipsis.scss
│ │ ├── _font-face.scss
│ │ ├── _font-stacks.scss
│ │ ├── _hide-text.scss
│ │ ├── _hide-visually.scss
│ │ ├── _margin.scss
│ │ ├── _modular-scale.scss
│ │ ├── _overflow-wrap.scss
│ │ ├── _padding.scss
│ │ ├── _position.scss
│ │ ├── _prefixer.scss
│ │ ├── _shade.scss
│ │ ├── _size.scss
│ │ ├── _strip-unit.scss
│ │ ├── _text-inputs.scss
│ │ ├── _timing-functions.scss
│ │ ├── _tint.scss
│ │ ├── _triangle.scss
│ │ └── _value-prefixer.scss
│ ├── settings/
│ │ └── _settings.scss
│ ├── utilities/
│ │ ├── _assign-inputs.scss
│ │ ├── _compact-shorthand.scss
│ │ ├── _contrast-ratio.scss
│ │ ├── _directional-property.scss
│ │ ├── _fetch-bourbon-setting.scss
│ │ ├── _font-source-declaration.scss
│ │ ├── _gamma.scss
│ │ ├── _lightness.scss
│ │ └── _unpack-shorthand.scss
│ └── validators/
│ ├── _contains-falsy.scss
│ ├── _contains.scss
│ ├── _is-color.scss
│ ├── _is-length.scss
│ ├── _is-number.scss
│ └── _is-size.scss
├── eyeglass-exports.js
├── features/
│ ├── install.feature
│ ├── step_definitions/
│ │ └── bourbon_steps.rb
│ ├── support/
│ │ ├── bourbon_support.rb
│ │ └── env.rb
│ ├── update.feature
│ └── version.feature
├── index.js
├── lib/
│ ├── bourbon/
│ │ ├── generator.rb
│ │ └── version.rb
│ └── bourbon.rb
├── package.json
└── spec/
├── bourbon/
│ ├── library/
│ │ ├── border_color_spec.rb
│ │ ├── border_radius_spec.rb
│ │ ├── border_style_spec.rb
│ │ ├── border_width_spec.rb
│ │ ├── buttons_spec.rb
│ │ ├── clearfix_spec.rb
│ │ ├── contrast_switch_spec.rb
│ │ ├── ellipsis_spec.rb
│ │ ├── font_face_spec_1.rb
│ │ ├── font_face_spec_2.rb
│ │ ├── font_face_spec_3.rb
│ │ ├── font_stacks_spec.rb
│ │ ├── hide_text_spec.rb
│ │ ├── hide_visually_spec.rb
│ │ ├── margin_spec.rb
│ │ ├── modular_scale_spec.rb
│ │ ├── overflow_wrap_spec.rb
│ │ ├── padding_spec.rb
│ │ ├── position_spec.rb
│ │ ├── prefixer_spec.rb
│ │ ├── shade_spec.rb
│ │ ├── size_spec.rb
│ │ ├── strip_unit_spec.rb
│ │ ├── text_inputs_spec.rb
│ │ ├── tint_spec.rb
│ │ └── triangle_spec.rb
│ ├── utilities/
│ │ ├── assign_inputs_spec.rb
│ │ ├── compact_shorthand_spec.rb
│ │ ├── contrast_ratio_spec.rb
│ │ ├── directional_property_spec.rb
│ │ ├── fetch_bourbon_setting_spec.rb
│ │ ├── font_source_declaration_spec.rb
│ │ ├── gamma_spec.rb
│ │ ├── lightness_spec.rb
│ │ └── unpack_spec.rb
│ └── validators/
│ ├── contains_spec.rb
│ ├── is_length_spec.rb
│ ├── is_number_spec.rb
│ └── is_size_spec.rb
├── fixtures/
│ ├── _setup.scss
│ ├── library/
│ │ ├── border-color.scss
│ │ ├── border-radius.scss
│ │ ├── border-style.scss
│ │ ├── border-width.scss
│ │ ├── buttons.scss
│ │ ├── clearfix.scss
│ │ ├── contrast-switch.scss
│ │ ├── ellipsis.scss
│ │ ├── font-face-1.scss
│ │ ├── font-face-2.scss
│ │ ├── font-face-3.scss
│ │ ├── font-stacks.scss
│ │ ├── hide-text.scss
│ │ ├── hide-visually.scss
│ │ ├── margin.scss
│ │ ├── modular-scale.scss
│ │ ├── overflow-wrap.scss
│ │ ├── padding.scss
│ │ ├── position.scss
│ │ ├── prefixer.scss
│ │ ├── shade.scss
│ │ ├── size.scss
│ │ ├── strip-unit.scss
│ │ ├── text-inputs.scss
│ │ ├── tint.scss
│ │ └── triangle.scss
│ ├── utilities/
│ │ ├── assign-inputs.scss
│ │ ├── compact-shorthand.scss
│ │ ├── contrast-ratio.scss
│ │ ├── directional-property.scss
│ │ ├── fetch-bourbon-setting.scss
│ │ ├── font-source-declaration.scss
│ │ ├── gamma.scss
│ │ ├── lightness.scss
│ │ └── unpack.scss
│ └── validators/
│ ├── contains.scss
│ ├── is-length.scss
│ ├── is-number.scss
│ └── is-size.scss
├── spec_helper.rb
└── support/
├── matchers/
│ ├── have_rule.rb
│ ├── have_ruleset.rb
│ └── have_value.rb
├── parser_support.rb
└── sass_support.rb
================================================
FILE CONTENTS
================================================
================================================
FILE: .circleci/config.yml
================================================
version: 2.1
orbs:
# orbs are basically bundles of pre-written build scripts that work for common cases
# https://github.com/CircleCI-Public/ruby-orb
ruby: circleci/ruby@1.1
jobs:
test:
parameters:
ruby-version:
type: string
docker:
- image: cimg/ruby:<< parameters.ruby-version >>-node
steps:
- checkout
- restore_cache:
keys:
- bourbon-bundle-v1-{{ checksum "bourbon.gemspec" }}
- bourbon-bundle-v1-
- run:
name: Run Bundler
command: bundle install --path vendor/bundle
- save_cache:
key: bourbon-bundle-v1-{{ checksum "bourbon.gemspec" }}
paths:
- vendor/bundle
- run:
name: Run the tests
command: bundle exec rake
- run:
name: Parse SassDoc comments
command: npm run sassdoc
workflows:
build_and_test:
jobs:
- test:
matrix:
parameters:
# https://github.com/CircleCI-Public/cimg-ruby
# only supports the last three ruby versions
ruby-version: ["2.7", "3.0", "3.1", "3.2"]
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
<!-- Feel free to remove any part of this issue template that is not relevant -->
<!-- Providing context helps us come up with a useful solution -->
## Description
<!-- What did you expect to happen? What happened instead? Was a specific error thrown? -->
## Steps to Reproduce
<!-- If you can reproduce the bug in a CodePen, link to it here -->
1. Step 1…
2.
3.
## Development Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
- Bourbon version:
- Platform:
- Link to the code repository:
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!-- Feel free to remove any part of this pull request template that is not relevant -->
## Description
<!-- What do your changes do or fix? -->
## Additional Information
<!-- Links to demos, e.g. CodePen, can be helpful, as are research and support documents -->
<!-- If this fixes or is related to an existing issue, link to it here (and in the commit message) -->
================================================
FILE: .github/workflows/dynamic-readme.yml
================================================
name: update-templates
on:
push:
branches:
- main
workflow_dispatch:
jobs:
update-templates:
permissions:
contents: write
pull-requests: write
pages: write
uses: thoughtbot/templates/.github/workflows/dynamic-readme.yaml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/dynamic-security.yml
================================================
name: update-security
on:
push:
paths:
- SECURITY.md
branches:
- main
workflow_dispatch:
jobs:
update-security:
permissions:
contents: write
pull-requests: write
pages: write
uses: thoughtbot/templates/.github/workflows/dynamic-security.yaml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .gitignore
================================================
*gem
*swp
.DS_store
.sass-cache
_site
Gemfile.lock
npm-debug.log
tmp/
================================================
FILE: .hound.yml
================================================
ruby:
enabled: true
scss:
enabled: false
stylelint:
config_file: .stylelintrc.json
enabled: true
# version: 10.1.0
================================================
FILE: .npmignore
================================================
.circleci/
.github/
.gitignore
.hound.yml
.ruby-version
.sass-cache
.stylelintrc.json
_site
bin/
bourbon.gemspec
CODE_OF_CONDUCT.md
CONTRIBUTING.md
features/
Gemfile
Gemfile.lock
lib/
pkg/
Rakefile
RELEASING.md
spec/
================================================
FILE: .stylelintrc.json
================================================
{
"extends": "@thoughtbot/stylelint-config"
}
================================================
FILE: CHANGELOG.md
================================================
# Change Log
All notable changes to this project will be documented in this file. This
project adheres to [Semantic Versioning](http://semver.org).
## [7.3.0] - 2023-01-20
## Changed
- Update initializers so they only include assets for >=Rails 5. [https://github.com/thoughtbot/bourbon/pull/1109/](https://github.com/thoughtbot/bourbon/pull/1109/files)
## [7.2.0] - 2022-02-22
### Changed
- Revert "Replace `/` with `math.div` per Dart Sass 2.0.0 updates."
[7.2.0]: https://github.com/thoughtbot/bourbon/compare/v7.1.0...v7.2.0
## [7.1.0] - 2022-02-22
### Changed
- Replace `/` with `math.div` per Dart Sass 2.0.0 updates.
[7.1.0]: https://github.com/thoughtbot/bourbon/compare/v7.0.0...v7.1.0
## [7.0.0] - 2020-03-09
### Added
- Improved error handling of unsupported font file formats in the `font-face`
mixin (supported formats are `woff2` and `woff`).
- CSS `var()` and `env()` functions are now accepted as values in the
`position` and `size` mixins.
### Changed
- Updated `thor` from 0.x to 1.x
### Removed
- The `font-face` mixin no longer supports `ttf`, `svg`, and `eot`
font file formats.
[7.0.0]: https://github.com/thoughtbot/bourbon/compare/v6.0.0...v7.0.0
## [6.0.0] - 2019-07-10
### Removed
- Installation through Bower is no longer supported.
- The sass gem (the deprecated Ruby Sass) is no longer a runtime dependency.
[6.0.0]: https://github.com/thoughtbot/bourbon/compare/v5.1.0...v6.0.0
## [5.1.0] - 2018-07-20
### Added
- `$font-stack-system` now includes the `system-ui` value.
### Changed
- The `_gamma` function will use a `pow` function, if available.
[5.1.0]: https://github.com/thoughtbot/bourbon/compare/v5.0.1...v5.1.0
## [5.0.1] - 2018-06-08
### Fixed
- Fixed an issue that would cause Bourbon to not be found when using SassC.
[5.0.1]: https://github.com/thoughtbot/bourbon/compare/v5.0.0...v5.0.1
## [5.0.0] - 2018-01-05
Bourbon 5.0.0 is a major release with lots of changes and removals, which are
documented below in each of the alpha and beta releases. There are no changes
between v5.0.0-beta.8 and v5.0.0. For information on how to upgrade from v4 to
v5, read our [migrating guide][migrating-guide].
[5.0.0]: https://github.com/thoughtbot/bourbon/compare/v5.0.0.beta.8...v5.0.0
[migrating-guide]: https://www.bourbon.io/docs/migrating-from-v4-to-v5/
## [5.0.0-beta.8] - 2017-06-26
### Added
- A `style` property has been added to our `package.json`, which makes for easy
importing when using npm-sass, sass-module-importer and others.
### Changed
- The `triangle` mixin no longer has default argument values. The order of the
arguments also changed: `$width` and `$height` now come before `$color`.
### Fixed
- The `bourbon update` CLI command now works when Bourbon is installed using a
custom path.
- Fixed an issue that would cause Bourbon to not be found within Rails apps.
[5.0.0-beta.8]: https://github.com/thoughtbot/bourbon/compare/v5.0.0.beta.7...v5.0.0.beta.8
## [5.0.0-beta.7] - 2016-11-03
### Added
- Added `white-space: nowrap;` to the `hide-visually` mixin so that content
renders on one line and is correctly pronounced by screen readers. You can
read more about this in Jesse Beach’s article “[Beware smushed off-screen
accessible text][smushed-text-article].”
### Changed
- Removed the default values from the `$position` and `$coordinates` arguments
for the `position` mixin.
- Updated `contrast-switch` to calculate contrast based on the WCAG 2.0
specification. Please note that it is an approximation and we cannot guarantee
full compliance, though all of our manual testing passed.
- Renamed the `$coordinates` argument in the `position` mixin
to `$box-edge-values`.
- Updated `$font-stack-system` to include Avenir Next, Avenir, Lucida
Grande, Helvetica, Noto, Franklin Gothic Medium, Century Gothic, and
Liberation Sans. This follows [system-fonts] by Adam Morse.
- The `word-break` property was removed from the `word-wrap` mixin and
is no longer output.
- Renamed the `word-wrap` mixin to `overflow-wrap` to align with the
name change in the [CSS spec].
[smushed-text-article]: https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe#.l4hkljiza
[system-fonts]: https://github.com/mrmrs/css-system-fonts
[CSS spec]: https://drafts.csswg.org/css-text-3/#propdef-overflow-wrap
[5.0.0-beta.7]: https://github.com/thoughtbot/bourbon/compare/v5.0.0.beta.6...v5.0.0.beta.7
## [5.0.0-beta.6] - 2016-06-06
### Added
- Added a `value-prefixer` mixin for generating vendor prefixes on values.
[5.0.0-beta.6]: https://github.com/thoughtbot/bourbon/compare/v5.0.0.beta.5...v5.0.0.beta.6
## [5.0.0-beta.5] - 2016-03-23
### Fixed
- Fixed a Sass load path issue that would intermittently break the importing of
Bourbon in Rails apps.
### Changed
- Swapped the order of the `$file-formats` and `$asset-pipeline` arguments in
the `font-face` mixin, so that `$asset-pipeline` is last (because it has a
default and is likely used the least).
[5.0.0-beta.5]: https://github.com/thoughtbot/bourbon/compare/v5.0.0.beta.4...v5.0.0.beta.5
## [5.0.0-beta.4] - 2016-03-11
### Fixed
- We accidentally published `5.0.0.beta.3` as a stable release on npm, rather
than a prerelease. We’ve unpublished that to go back to `4.2.6` on the stable
channel.
[5.0.0-beta.4]: https://github.com/thoughtbot/bourbon/compare/v5.0.0.beta.3...v5.0.0.beta.4
## [5.0.0-beta.3] - 2016-03-04
### Fixed
- Added `pathname` requirement to fix install issues.
[5.0.0-beta.3]: https://github.com/thoughtbot/bourbon/compare/v5.0.0.beta.2...v5.0.0.beta.3
## [5.0.0-beta.2] - 2016-03-03
### Added
- Added global settings for the `contrast-switch` mixin:
`contrast-switch-dark-color` & `contrast-switch-light-color`.
- Added the `triangle` mixin back, but note that it’s been refactored and the
arguments have changed. See [43e5a90].
### Changed
- Switched argument names in `contrast-switch`; `$dark-color` is now
`$light-color` and `$light-color` is now `$dark-color`.
- The `is-light` function is now private.
### Removed
- Dropped support for Ruby on Rails versions older than 4.2.
- Dropped support for LibSass versions older than 3.3.
[5.0.0-beta.2]: https://github.com/thoughtbot/bourbon/compare/v5.0.0.beta.1...v5.0.0.beta.2
[43e5a90]: https://github.com/thoughtbot/bourbon/commit/43e5a90e7e624d2977731030ccdb36b3c2e460d9
## [5.0.0-beta.1] - 2016-02-09
### Added
- Added a `contrast-switch` function that switches between two colors based on the
lightness of a another color. Great for building button styles.
- Added an `$all-text-inputs-invalid` variable to target the `:invalid`
pseudo-class on all text-based inputs.
- The `ellipsis` mixin now takes a `$display` argument.
- Added a font stack for system fonts: `$font-stack-system`.
- Added a `hide-visually` mixin that hides an element visually while still
allowing the content to be accessible to assistive technology,
e.g. screen readers.
- The `font-face` mixin now allows additional CSS properties to be included in
its block, which will output as part of the `@font-face` declaration.
See [2356719].
### Changed
- The global default for the `modular-scale` ratio is now set to
`$major-third` (`1.25`), instead of `$perfect-fourth` (`1.333`).
- All font stack variables are now prefixed with `$font-stack-`,
e.g. `$font-stack-helvetica`.
- Global settings are now set via a `$bourbon` map, instead of variables.
See [4e43c2d].
- The `clearfix` mixin now uses `block` display, instead of `table`.
### Removed
- The `$weight` and `$style` arguments in the `font-face` mixin have been
removed. Instead, you can now include these—along with other CSS
properties—within the mixin block and they’ll be output as part of the
`@font-face` declaration.
[5.0.0-beta.1]: https://github.com/thoughtbot/bourbon/compare/da4451e...v5.0.0.beta.1
[2356719]: https://github.com/thoughtbot/bourbon/commit/235671948ef3a9c343c4391d250082a0373c8d83
[4e43c2d]: https://github.com/thoughtbot/bourbon/commit/4e43c2d7507999b539771bdc1b3733b18b3c1883
## [5.0.0.alpha.0] - 2015-08-21
### Added
- Added a `$global-font-file-formats` setting to globally set the file formats
for the `font-face` mixin. The default is `("ttf", "woff2", "woff")`.
- Add `$consolas`, `$courier-new` and `$monaco` variables (these replace the
removed `$monospace` variable).
### Changed
- Removed the type selectors in `$all-text-inputs` and `$all-buttons` to
reduce specificity.
- Font stacks have been modernized. See [3cf106a].
- The `strip-units` function is now `strip-unit`.
- The `size` mixin now requires a comma-separated argument list,
e.g. `@include size(1em, 2em);`.
### Removed
- All vendor prefixing mixins have been removed. These include:
- `align-items`
- `animation-delay`
- `animation-direction`
- `animation-duration`
- `animation-fill-mode`
- `animation-iteration-count`
- `animation-name`
- `animation-play-state`
- `animation-timing-function`
- `animation`
- `appearance`
- `backface-visibility`
- `background-image`
- `background`
- `border-image`
- `calc`
- `column-count`
- `column-fill`
- `column-gap`
- `column-rule-color`
- `column-rule-style`
- `column-rule-width`
- `column-rule`
- `column-span`
- `column-width`
- `columns`
- `display`
- `filter`
- `flex-direction`
- `flex`
- `font-feature-settings`
- `hidpi`
- `hyphens`
- `image-rendering`
- `justify-content`
- `keyframes`
- `linear-gradient`
- `perspective`
- `placeholder`
- `radial-gradient`
- `selection`
- `text-decoration-color`
- `text-decoration-line`
- `text-decoration-style`
- `text-decoration`
- `transform-origin`
- `transform-style`
- `transform`
- `transition-delay`
- `transition-duration`
- `transition-property`
- `transition-timing-function`
- `transition`
- `user-select`
- For prefixing, we recommend using a more robust and maintainable solution
like [Autoprefixer].
- The `$global-prefixes` setting has been removed and the `prefixer` mixin
has been refactored and no longer uses it.
- The `$monospace` variable has been removed.
- The `box-sizing` mixin has been removed.
- The `button` mixin has been removed.
- The `em` and `rem` functions have been removed.
- [See the discussion on why these were removed][em-rem-issue].
- The `flex-grid` function has been removed.
- The `flex-gutter` function has been removed.
- The `golden-ratio` function has been removed.
- The `grid-width` function has been removed.
- The `inline-block` mixin has been removed.
- The `retina-image` mixin has been removed.
- The `triangle` mixin has been removed.
[5.0.0.alpha.0]: https://github.com/thoughtbot/bourbon/compare/v4.3.4...v5.0.0.alpha.0
[3cf106a]: https://github.com/thoughtbot/bourbon/commit/3cf106a210c1bae7765e6193f62310f95fdee0b7
[Autoprefixer]: https://github.com/postcss/autoprefixer
[em-rem-issue]: https://github.com/thoughtbot/bourbon/issues/691
## [4.3.4] - 2017-04-01
### Changed
- Updated deprecation warning message for `strip-units`. ([#1016])
[4.3.4]: https://github.com/thoughtbot/bourbon/compare/v4.3.3...v4.3.4
[#1016]: https://github.com/thoughtbot/bourbon/pull/1016
## [4.3.3] - 2017-02-23
### Fixed
- Internal Bourbon deprecation warnings for `is-size` and `is-length` will no
longer be thrown when using the `size` mixin.
[4.3.3]: https://github.com/thoughtbot/bourbon/compare/v4.3.2...v4.3.3
## [4.3.2] - 2017-02-10
### Fixed
- Internal Bourbon deprecation warnings for `unpack` and `is-length` will no
longer be thrown when using the `position` mixin. ([#1004])
[4.3.2]: https://github.com/thoughtbot/bourbon/compare/v4.3.1...v4.3.2
[#1004]: https://github.com/thoughtbot/bourbon/pull/1004
## [4.3.1] - 2017-02-07
### Fixed
- Internal Bourbon deprecation warnings will no longer be thrown. ([#1002])
[4.3.1]: https://github.com/thoughtbot/bourbon/compare/v4.3.0...v4.3.1
[#1002]: https://github.com/thoughtbot/bourbon/pull/1002
## [4.3.0] - 2017-02-03
### Added
- Added deprecation warnings for features that will be removed in 5.0.0. Please
reference our [change log], which includes a list of these changes and
removals. ([#891])
[4.3.0]: https://github.com/thoughtbot/bourbon/compare/v4.2.7...v4.3.0
[change log]: https://github.com/thoughtbot/bourbon/blob/master/CHANGELOG.md
[#891]: https://github.com/thoughtbot/bourbon/pull/891
## [4.2.7] - 2016-04-15
### Fixed
- Fixed a Sass deprecation warning when using the `background` and
`background-image` mixins.
[4.2.7]: https://github.com/thoughtbot/bourbon/compare/v4.2.6...v4.2.7
## [4.2.6] - 2015-10-17
### Fixed
- Fixed a bug with eyeglass support.
[4.2.6]: https://github.com/thoughtbot/bourbon/compare/v4.2.5...v4.2.6
## [4.2.5] - 2015-09-17
## Added
- Support for [eyeglass].
[4.2.5]: https://github.com/thoughtbot/bourbon/compare/v4.2.4...v4.2.5
[eyeglass]: http://eyeglass.rocks/
## [4.2.4] - 2015-08-21
## Changed
- [`$all-text-inputs`] now accounts for `input`’s that don’t have a `type`
attribute specified, as they default to `type="text"`.
(https://github.com/thoughtbot/bourbon/commit/8e7e36e01c47194d83951fb6315c5b26a008f2b7)
- The [`bourbon` npm package] now has a proper load path.
(https://github.com/thoughtbot/bourbon/commit/36c2d5576f1fe9dbdfd9543e15064c5a4a16343e)
[4.2.4]: https://github.com/thoughtbot/bourbon/compare/v4.2.3...v4.2.4
[`$all-text-inputs`]: http://bourbon.io/docs/#text-inputs
[`bourbon` npm package]: https://npmjs.com/package/bourbon
## [4.2.3] - 2015-05-18
## Fixed
- Fixed an issue with the `font-face` mixin outputting an extraneous commas when
using LibSass set to compressed output.
[4.2.3]: https://github.com/thoughtbot/bourbon/compare/v4.2.2...v4.2.3
## [4.2.2] - 2015-04-01
## Fixed
- The `flex-direction` mixin now properly outputs box-direction (old syntax) if
set to normal.
[4.2.2]: https://github.com/thoughtbot/bourbon/compare/v4.2.1...v4.2.2
## [4.2.1] - 2015-02-23
## Fixed
- Restored the `app/` directory for npm.
[4.2.1]: https://github.com/thoughtbot/bourbon/compare/v4.2.0...v4.2.1
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Code of Conduct
By participating in this project, you agree to abide by the
[thoughtbot code of conduct][tb-coc].
[tb-coc]: https://thoughtbot.com/open-source-code-of-conduct
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
## Governance
We, the maintainers of Bourbon, would like you to know what to expect when
interacting with this project's repo.
As a *user* of Bourbon, you can expect care to be put into official releases.
The maintainers cannot guarantee that the `master` branch will have the same
API forever.
If you *review pull requests* or *comment on issues*, you are expected to abide
by our [code of conduct].
As a *contributor*, submitting a pull request or opening an issue, you can
expect an initial response from a maintainer within two weeks. The maintainers
cannot guarantee that we will accept all feature requests, and may fix bugs in
ways other than how the contributor suggests. You are expected to abide by our
[code of conduct].
As a *maintainer*, you can merge pull requests (even your own) at any time.
Maintainers are encouraged to request code review from others at thoughtbot or
any relevant peers. You are expected to abide by our [code of conduct].
Only members of thoughtbot may be maintainers.
## Pull Requests
We welcome pull requests from everyone. Here’s a quick guide:
1. [Fork the repository][fork] and clone to your machine.
1. Run `bundle install`.
1. Make sure the tests pass: `bundle exec rake`.
1. Make your change, following our style guide (below). Write tests. Make sure
the tests pass: `bundle exec rake`.
1. Write a [good commit message][commit]. Push to your fork and
[submit a pull request][pr]. If [Hound] catches style violations, fix them.
1. Wait for us. We try to at least comment on pull requests within one week. We
may suggest changes.
[fork]: https://github.com/thoughtbot/bourbon/fork
[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[pr]: https://github.com/thoughtbot/bourbon/compare/
[hound]: https://houndci.com
### Style Guide
Bourbon uses Sass’s SCSS syntax and aligns to
[thoughtbot’s style guides][sass guide]. High-level notes:
- Use two-space indentation (no tabs).
- Use double quotation marks.
- Use hyphens when naming things: `hide-visually` rather than `hide_visually` or
`hideVisually`.
- Use one space between property and value: `width: 20px` rather than
`width:20px`.
- Names should be descriptive and aim for clarity over brevity:
`$all-text-inputs-hover` rather than `$inputshover` or `$alltxthvr`.
- Order CSS declarations alphabetically.
- No trailing whitespace.
We use [stylelint][stylelint] to lint our CSS and Sass. It's configuration can
be found in `.stylelintrc.json`. You can run stylelint from the command line via
`npm run stylelint`, or integrate it with your text editor.
[sass guide]: https://github.com/thoughtbot/guides
[stylelint]: https://stylelint.io/
### Documentation
We use [SassDoc] to document Bourbon. [Annotations] should be ordered:
- `@link`
- `@see`
- `@type`
- `@argument`
- `@content`
- `@property`
- `@return`
- `@example`
- `@require`
- `@access`
- `@since`
- `@author`
- `@deprecated`
- `@todo`
[SassDoc]: http://sassdoc.com
[Annotations]: http://sassdoc.com/annotations
[code of conduct]: https://thoughtbot.com/open-source-code-of-conduct
================================================
FILE: Gemfile
================================================
source "https://rubygems.org"
gemspec
================================================
FILE: LICENSE.md
================================================
The MIT License (MIT)
Copyright © 2011-2020 [thoughtbot, inc.](http://thoughtbot.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
[<img src="https://images.thoughtbot.com/bourbon/bourbon-logo.svg" width="200" alt="Bourbon logo">][Bourbon]
[](https://houndci.com)
## Deprecated as of September 13, 2024
This project is no longer maintained. We encourage people to leverage the modern native CSS features in lieu of this library. You can refer to [our blog post](https://thoughtbot.com/blog/you-might-not-need-bourbon) on how to go about replacing or rethinking each helper.
## A Lightweight Sass Tool Set
[Bourbon] is a library of [Sass] mixins and functions that are designed to make
you a more efficient style sheet author.
It is…
- Dependency-free: Bourbon is pure Sass.
- Human-readable: We aim for clarity over brevity.
- Lightweight: Zero output post-install and has no visual opinion.
[Bourbon]: https://www.bourbon.io/
[Sass]: http://sass-lang.com
### Helpful Links
- [Documentation](https://www.bourbon.io/docs/latest/)
- [Change log](CHANGELOG.md)
- [Twitter](https://twitter.com/bourbonsass)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/bourbon)
## Table of Contents
- [Requirements](#requirements)
- [Installation](#installation)
- [Command Line Interface](#command-line-interface)
- [Browser Support](#browser-support)
- [Contributing](#contributing)
- [License](#license)
- [About](#about)
## Requirements
- [Sass] 3.4+ or [LibSass] 3.3+
[Sass]: https://github.com/sass/sass
[LibSass]: https://github.com/sass/libsass
## Installation
1. Install the Bourbon gem using the [RubyGems] package manager:
```bash
gem install bourbon
```
1. Install the Bourbon library into the current directory:
```bash
bourbon install
```
**Pro Tip:** You can target installation into a specific directory using the
`path` flag:
```bash
bourbon install --path my/custom/path/
```
1. Import Bourbon at the beginning of your stylesheet:
```scss
@import "bourbon/bourbon";
```
It’s not recommended that you modify Bourbon’s files directly as it will
make updating to future versions difficult, by overwriting your custom
changes or causing merge conflicts.
[RubyGems]: https://rubygems.org
### Installation for Ruby on Rails 4.2+
1. Add Bourbon to your Gemfile:
```ruby
gem "bourbon"
```
1. Then run:
```bash
bundle install
```
1. Restart your server and rename `application.css` to `application.scss`:
```bash
mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
```
1. Delete _all_ Sprockets directives in `application.scss` (`require`,
`require_tree` and `require_self`) and use Sass’s native `@import` instead
([why?][sass-import]).
1. Import Bourbon at the beginning of `application.scss`. Any project styles
that utilize Bourbon’s features must be imported after Bourbon.
```scss
@import "bourbon";
@import "home";
@import "users";
```
[sass-import]: https://content.pivotal.io/blog/structure-your-sass-files-with-import
### Installing with npm and using a Node-based asset pipeline
1. Add Bourbon as a dependency:
```bash
npm install --save bourbon
```
1. If you’re using [eyeglass], skip to Step 3. Otherwise, you’ll need to add
Bourbon to your node-sass `includePaths` option.
`require("bourbon").includePaths` is an array of directories that you should
pass to node-sass. How you do this depends on how node-sass is integrated
into your project.
1. Import Bourbon into your Sass files:
```scss
@import "bourbon";
```
[eyeglass]: https://github.com/sass-eyeglass/eyeglass
### Installing older versions of Bourbon
1. Uninstall any Bourbon gem versions you already have:
```bash
gem uninstall bourbon
```
1. Reinstall the Bourbon gem, using the `-v` flag to specify the version
you need:
```bash
gem install bourbon -v 4.2.7
```
1. Follow the [instructions above](#installation) to install Bourbon into
your project.
## Command Line Interface
```bash
bourbon [options]
```
### Options
| Option | Description |
| :---------------- | :------------------------ |
| `-h`, `--help` | Show help |
| `-v`, `--version` | Show the version number |
| `--path` | Specify a custom path |
| `--force` | Force install (overwrite) |
### Commands
| Command | Description |
| :---------------- | :---------------------------------------------------- |
| `bourbon install` | Install Bourbon into the current directory |
| `bourbon update` | Overwrite and update Bourbon in the current directory |
| `bourbon help` | Show help |
## Browser Support
Bourbon supports Internet Explorer 11+ and the latest versions of Chrome,
Firefox, Safari, and Edge.
## Contributing
See the [contributing] document. Thank you, [contributors]!
[contributing]: CONTRIBUTING.md
[contributors]: https://github.com/thoughtbot/bourbon/graphs/contributors
## License
Bourbon is copyright © 2011 [thoughtbot, inc.][thoughtbot] It is free
software, and may be redistributed under the terms specified in the [license].
[license]: LICENSE.md
<!-- START /templates/footer.md -->
## About thoughtbot

This repo is maintained and funded by thoughtbot, inc.
The names and logos for thoughtbot are trademarks of thoughtbot, inc.
We love open source software!
See [our other projects][community].
We are [available for hire][hire].
[community]: https://thoughtbot.com/community?utm_source=github
[hire]: https://thoughtbot.com/hire-us?utm_source=github
<!-- END /templates/footer.md -->
[thoughtbot]: https://thoughtbot.com?utm_source=github
================================================
FILE: RELEASING.md
================================================
# Releasing
1. Update the version number in these places:
- `lib/bourbon/version.rb`
- `core/_bourbon.scss`
- `package.json`
1. Update `CHANGELOG.md`. We follow the guidelines from
[Keep a Changelog][keep-a-changelog].
1. Commit changes. Use the convention “Bourbon vX.X.X” in your commit message.
There shouldn’t be code changes, and thus CI doesn’t need to run.
1. Run `bundle exec rake release`, which tags the release, pushes the tag to
GitHub, and pushes the gem to RubyGems.org.
1. Run `npm publish`, which pushes the new version to npm’s registry (if
releasing a pre-release, run `npm publish --tag beta`).
1. Draft a [new GitHub release][github-release].
1. Tweet about the release from the [@bourbonsass] Twitter account, e.g.
> We’ve released Bourbon {release_title}: {release_link}
1. Re-generate and publish the [documentation website][website].
[keep-a-changelog]: https://keepachangelog.com/en/1.0.0/
[github-release]: https://github.com/thoughtbot/bourbon/releases/new
[@bourbonsass]: https://twitter.com/bourbonsass
[website]: https://github.com/thoughtbot/bourbon.io
================================================
FILE: Rakefile
================================================
require "bundler"
require "cucumber/rake/task"
require "rspec/core/rake_task"
Bundler::GemHelper.install_tasks
Cucumber::Rake::Task.new
RSpec::Core::RakeTask.new(:spec)
task :default => [:spec, :cucumber]
================================================
FILE: SECURITY.md
================================================
<!-- START /templates/security.md -->
# Security Policy
## Supported Versions
Only the the latest version of this project is supported at a given time. If
you find a security issue with an older version, please try updating to the
latest version first.
If for some reason you can't update to the latest version, please let us know
your reasons so that we can have a better understanding of your situation.
## Reporting a Vulnerability
For security inquiries or vulnerability reports, visit
<https://thoughtbot.com/security>.
If you have any suggestions to improve this policy, visit <https://thoughtbot.com/security>.
<!-- END /templates/security.md -->
================================================
FILE: bin/bourbon
================================================
#!/usr/bin/env ruby
require File.dirname(__FILE__) + "/../lib/bourbon.rb"
Bourbon::Generator.start
================================================
FILE: bourbon.gemspec
================================================
$:.push File.expand_path("../lib", __FILE__)
require "bourbon/version"
Gem::Specification.new do |s|
s.add_development_dependency "aruba", "~> 0.14"
s.add_development_dependency "css_parser", "~> 1.4"
s.add_development_dependency "cucumber", "~> 2.0"
s.add_development_dependency "rake"
s.add_development_dependency "rspec", "~> 3.4"
s.add_development_dependency "sass"
s.add_runtime_dependency "thor", "~> 1.0"
s.authors = [
"Christian Reuter",
"Damian Galarza",
"Gabe Berke-Williams",
"Hugo Giraudel",
"Joshua Ogle",
"Kyle Fiedler",
"Phil LaPier",
"Reda Lemeden",
"Tyson Gach",
"Will McMahan"
]
s.description = <<-DESC
Bourbon is a library of pure Sass mixins and functions that are designed to
make you a more efficient developer.
DESC
s.email = "design+bourbon@thoughtbot.com"
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.files = `git ls-files`.split("\n")
s.homepage = "https://www.bourbon.io/"
s.license = "MIT"
s.name = "bourbon"
s.platform = Gem::Platform::RUBY
s.require_paths = ["lib"]
s.summary = "A lightweight Sass tool set."
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.version = Bourbon::VERSION
end
================================================
FILE: core/_bourbon.scss
================================================
// Bourbon 7.3.0
// https://www.bourbon.io/
// Copyright 2011-2020 thoughtbot, inc.
// MIT License
@import "bourbon/helpers/buttons-list";
@import "bourbon/helpers/scales";
@import "bourbon/helpers/text-inputs-list";
@import "bourbon/settings/settings";
@import "bourbon/validators/contains";
@import "bourbon/validators/contains-falsy";
@import "bourbon/validators/is-color";
@import "bourbon/validators/is-length";
@import "bourbon/validators/is-number";
@import "bourbon/validators/is-size";
@import "bourbon/utilities/assign-inputs";
@import "bourbon/utilities/compact-shorthand";
@import "bourbon/utilities/directional-property";
@import "bourbon/utilities/fetch-bourbon-setting";
@import "bourbon/utilities/font-source-declaration";
@import "bourbon/utilities/gamma";
@import "bourbon/utilities/lightness";
@import "bourbon/utilities/contrast-ratio";
@import "bourbon/utilities/unpack-shorthand";
@import "bourbon/library/border-color";
@import "bourbon/library/border-radius";
@import "bourbon/library/border-style";
@import "bourbon/library/border-width";
@import "bourbon/library/buttons";
@import "bourbon/library/clearfix";
@import "bourbon/library/contrast-switch";
@import "bourbon/library/ellipsis";
@import "bourbon/library/font-face";
@import "bourbon/library/font-stacks";
@import "bourbon/library/hide-text";
@import "bourbon/library/hide-visually";
@import "bourbon/library/margin";
@import "bourbon/library/modular-scale";
@import "bourbon/library/overflow-wrap";
@import "bourbon/library/padding";
@import "bourbon/library/position";
@import "bourbon/library/prefixer";
@import "bourbon/library/shade";
@import "bourbon/library/size";
@import "bourbon/library/strip-unit";
@import "bourbon/library/text-inputs";
@import "bourbon/library/timing-functions";
@import "bourbon/library/tint";
@import "bourbon/library/triangle";
@import "bourbon/library/value-prefixer";
================================================
FILE: core/bourbon/helpers/_buttons-list.scss
================================================
@charset "UTF-8";
/// A list of all HTML button elements.
///
/// @type list
///
/// @access private
$_buttons-list: (
"button",
"[type='button']",
"[type='reset']",
"[type='submit']",
);
================================================
FILE: core/bourbon/helpers/_scales.scss
================================================
@charset "UTF-8";
////
/// Pre-defined scales for use with the `modular-scale` function.
///
/// @type number (unitless)
///
/// @see {function} modular-scale
////
$minor-second: 1.067;
$major-second: 1.125;
$minor-third: 1.2;
$major-third: 1.25;
$perfect-fourth: 1.333;
$augmented-fourth: 1.414;
$perfect-fifth: 1.5;
$minor-sixth: 1.6;
$golden: 1.618;
$major-sixth: 1.667;
$minor-seventh: 1.778;
$major-seventh: 1.875;
$octave: 2;
$major-tenth: 2.5;
$major-eleventh: 2.667;
$major-twelfth: 3;
$double-octave: 4;
================================================
FILE: core/bourbon/helpers/_text-inputs-list.scss
================================================
@charset "UTF-8";
/// A list of all _text-based_ HTML inputs.
///
/// @type list
///
/// @access private
$_text-inputs-list: (
"[type='color']",
"[type='date']",
"[type='datetime']",
"[type='datetime-local']",
"[type='email']",
"[type='month']",
"[type='number']",
"[type='password']",
"[type='search']",
"[type='tel']",
"[type='text']",
"[type='time']",
"[type='url']",
"[type='week']",
"input:not([type])",
"textarea",
);
================================================
FILE: core/bourbon/library/_border-color.scss
================================================
@charset "UTF-8";
/// Provides a concise, one-line method for setting `border-color` on specific
/// edges of a box. Use a `null` value to “skip” edges of the box with standard
/// CSS shorthand.
///
/// @argument {list} $values
/// List of colors; accepts CSS shorthand.
///
/// @example scss
/// .element {
/// @include border-color(#a60b55 #76cd9c null #e8ae1a);
/// }
///
/// // CSS Output
/// .element {
/// border-left-color: #e8ae1a;
/// border-right-color: #76cd9c;
/// border-top-color: #a60b55;
/// }
///
/// @require {mixin} _directional-property
@mixin border-color($values) {
@include _directional-property(border, color, $values);
}
================================================
FILE: core/bourbon/library/_border-radius.scss
================================================
@charset "UTF-8";
/// Provides a concise, one-line method for setting `border-radius` on both the
/// top-left and top-right of a box.
///
/// @argument {number (with unit)} $radii
///
/// @example scss
/// .element {
/// @include border-top-radius(4px);
/// }
///
/// // CSS Output
/// .element {
/// border-top-left-radius: 4px;
/// border-top-right-radius: 4px;
/// }
@mixin border-top-radius($radii) {
border-top-left-radius: $radii;
border-top-right-radius: $radii;
}
/// Provides a concise, one-line method for setting `border-radius` on both the
/// top-right and bottom-right of a box.
///
/// @argument {number (with unit)} $radii
///
/// @example scss
/// .element {
/// @include border-right-radius(3px);
/// }
///
/// // CSS Output
/// .element {
/// border-bottom-right-radius: 3px;
/// border-top-right-radius: 3px;
/// }
@mixin border-right-radius($radii) {
border-bottom-right-radius: $radii;
border-top-right-radius: $radii;
}
/// Provides a concise, one-line method for setting `border-radius` on both the
/// bottom-left and bottom-right of a box.
///
/// @argument {number (with unit)} $radii
///
/// @example scss
/// .element {
/// @include border-bottom-radius(2px);
/// }
///
/// // CSS Output
/// .element {
/// border-bottom-left-radius: 2px;
/// border-bottom-right-radius: 2px;
/// }
@mixin border-bottom-radius($radii) {
border-bottom-left-radius: $radii;
border-bottom-right-radius: $radii;
}
/// Provides a concise, one-line method for setting `border-radius` on both the
/// top-left and bottom-left of a box.
///
/// @argument {number (with unit)} $radii
///
/// @example scss
/// .element {
/// @include border-left-radius(1px);
/// }
///
/// // CSS Output
/// .element {
/// border-bottom-left-radius: 1px;
/// border-top-left-radius: 1px;
/// }
@mixin border-left-radius($radii) {
border-bottom-left-radius: $radii;
border-top-left-radius: $radii;
}
================================================
FILE: core/bourbon/library/_border-style.scss
================================================
@charset "UTF-8";
/// Provides a concise, one-line method for setting `border-style` on specific
/// edges of a box. Use a `null` value to “skip” edges of the box with standard
/// CSS shorthand.
///
/// @argument {list} $values
/// List of border styles; accepts CSS shorthand.
///
/// @example scss
/// .element {
/// @include border-style(dashed null solid);
/// }
///
/// // CSS Output
/// .element {
/// border-bottom-style: solid;
/// border-top-style: dashed;
/// }
///
/// @require {mixin} _directional-property
@mixin border-style($values) {
@include _directional-property(border, style, $values);
}
================================================
FILE: core/bourbon/library/_border-width.scss
================================================
@charset "UTF-8";
/// Provides a concise, one-line method for setting `border-width` on specific
/// edges of a box. Use a `null` value to “skip” edges of the box with standard
/// CSS shorthand.
///
/// @argument {list} $values
/// List of border widths; accepts CSS shorthand.
///
/// @example scss
/// .element {
/// @include border-width(1em null 20px);
/// }
///
/// // CSS Output
/// .element {
/// border-bottom-width: 20px;
/// border-top-width: 1em;
/// }
///
/// @require {mixin} _directional-property
@mixin border-width($values) {
@include _directional-property(border, width, $values);
}
================================================
FILE: core/bourbon/library/_buttons.scss
================================================
@charset "UTF-8";
////
/// @type list
///
/// @require {function} _assign-inputs
///
/// @require {variable} $_buttons-list
////
/// A list of all HTML button elements. Please note that you must interpolate
/// the variable (`#{}`) to use it as a selector.
///
/// @example scss
/// #{$all-buttons} {
/// background-color: #f00;
/// }
///
/// // CSS Output
/// button,
/// [type='button'],
/// [type='reset'],
/// [type='submit'] {
/// background-color: #f00;
/// }
$all-buttons: _assign-inputs($_buttons-list);
/// A list of all HTML button elements with the `:active` pseudo-class applied.
/// Please note that you must interpolate the variable (`#{}`) to use it as a
/// selector.
///
/// @example scss
/// #{$all-buttons-active} {
/// background-color: #00f;
/// }
///
/// // CSS Output
/// button:active,
/// [type='button']:active,
/// [type='reset']:active,
/// [type='submit']:active {
/// background-color: #00f;
/// }
$all-buttons-active: _assign-inputs($_buttons-list, active);
/// A list of all HTML button elements with the `:focus` pseudo-class applied.
/// Please note that you must interpolate the variable (`#{}`) to use it as a
/// selector.
///
/// @example scss
/// #{$all-buttons-focus} {
/// background-color: #0f0;
/// }
///
/// // CSS Output
/// button:focus,
/// [type='button']:focus,
/// [type='reset']:focus,
/// [type='submit']:focus {
/// background-color: #0f0;
/// }
$all-buttons-focus: _assign-inputs($_buttons-list, focus);
/// A list of all HTML button elements with the `:hover` pseudo-class applied.
/// Please note that you must interpolate the variable (`#{}`) to use it as a
/// selector.
///
/// @example scss
/// #{$all-buttons-hover} {
/// background-color: #0f0;
/// }
///
/// // CSS Output
/// button:hover,
/// [type='button']:hover,
/// [type='reset']:hover,
/// [type='submit']:hover {
/// background-color: #0f0;
/// }
$all-buttons-hover: _assign-inputs($_buttons-list, hover);
================================================
FILE: core/bourbon/library/_clearfix.scss
================================================
@charset "UTF-8";
/// Provides an easy way to include a clearfix for containing floats.
///
/// @link https://goo.gl/yP5hiZ
///
/// @example scss
/// .element {
/// @include clearfix;
/// }
///
/// // CSS Output
/// .element::after {
/// clear: both;
/// content: "";
/// display: block;
/// }
@mixin clearfix {
&::after {
clear: both;
content: "";
display: block;
}
}
================================================
FILE: core/bourbon/library/_contrast-switch.scss
================================================
@charset "UTF-8";
/// Switches between two colors based on the contrast to another color. It’s
/// like a [ternary operator] for color contrast and can be useful for building
/// a button system.
///
/// The calculation of the contrast ratio is based on the [WCAG 2.0
/// specification]. However, we cannot guarantee full compliance, though all of
/// our manual testing passed.
///
/// [ternary operator]: https://goo.gl/ccfLqi
/// [WCAG 2.0 specification]: https://goo.gl/zhQuYA
///
/// @argument {color} $base-color
/// The color to evaluate lightness against.
///
/// @argument {color} $dark-color [#000]
/// The color to be output when `$base-color` is light. Can also be set
/// globally using the `contrast-switch-dark-color` key in the
/// Bourbon settings.
///
/// @argument {color} $light-color [#fff]
/// The color to be output when `$base-color` is dark. Can also be set
/// globally using the `contrast-switch-light-color` key in the
/// Bourbon settings.
///
/// @return {color}
///
/// @example scss
/// .element {
/// color: contrast-switch(#bae6e6);
/// }
///
/// // CSS Output
/// .element {
/// color: #000;
/// }
///
/// @example scss
/// .element {
/// $button-color: #2d72d9;
/// background-color: $button-color;
/// color: contrast-switch($button-color, #222, #eee);
/// }
///
/// // CSS Output
/// .element {
/// background-color: #2d72d9;
/// color: #eee;
/// }
///
/// @require {function} _fetch-bourbon-setting
///
/// @require {function} _is-color
///
/// @require {function} _contrast-ratio
///
/// @since 5.0.0
@function contrast-switch(
$base-color,
$dark-color: _fetch-bourbon-setting("contrast-switch-dark-color"),
$light-color: _fetch-bourbon-setting("contrast-switch-light-color")
) {
@if not _is-color($base-color) {
@error "`#{$base-color}` is not a valid color for the `$base-color` " +
"argument in the `contrast-switch` function.";
} @else if not _is-color($dark-color) {
@error "`#{$dark-color}` is not a valid color for the `$dark-color` " +
"argument in the `contrast-switch` function.";
} @else if not _is-color($light-color) {
@error "`#{$light-color}` is not a valid color for the `$light-color` " +
"argument in the `contrast-switch` function.";
} @else {
$-contrast-to-dark: _contrast-ratio($base-color, $dark-color);
$-contrast-to-light: _contrast-ratio($base-color, $light-color);
$-prefer-dark: $-contrast-to-dark >= $-contrast-to-light;
@return if($-prefer-dark, $dark-color, $light-color);
}
}
================================================
FILE: core/bourbon/library/_ellipsis.scss
================================================
@charset "UTF-8";
/// Truncates text and adds an ellipsis to represent overflow.
///
/// @argument {number} $width [100%]
/// The `max-width` for the string to respect before being truncated.
///
/// @argument {string} $display [inline-block]
/// Sets the display-value of the element.
///
/// @example scss
/// .element {
/// @include ellipsis;
/// }
///
/// // CSS Output
/// .element {
/// display: inline-block;
/// max-width: 100%;
/// overflow: hidden;
/// text-overflow: ellipsis;
/// white-space: nowrap;
/// word-wrap: normal;
/// }
@mixin ellipsis(
$width: 100%,
$display: inline-block
) {
display: $display;
max-width: $width;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-wrap: normal;
}
================================================
FILE: core/bourbon/library/_font-face.scss
================================================
@charset "UTF-8";
/// Generates an `@font-face` declaration. You can choose the specific file
/// formats you need to output; the mixin supports `woff2`
/// and `woff`. The mixin also supports usage with the Rails Asset Pipeline,
/// which you can enable per use, or globally in the `$bourbon()` settings.
///
/// @argument {string} $font-family
///
/// @argument {string} $file-path
///
/// @argument {string | list} $file-formats [("woff2", "woff")]
/// List of the font file formats to include. Can also be set globally using
/// the `global-font-file-formats` key in the Bourbon settings.
///
/// @argument {boolean} $asset-pipeline [false]
/// Set to `true` if you’re using the Rails Asset Pipeline (place the fonts
/// in `app/assets/fonts/`). Can also be set globally using the
/// `rails-asset-pipeline` key in the Bourbon settings.
///
/// @content
/// Any additional CSS properties that are included in the `@include`
/// directive will be output within the `@font-face` declaration, e.g. you can
/// pass in `font-weight`, `font-style` and/or `unicode-range`.
///
/// @example scss
/// @include font-face(
/// "source-sans-pro",
/// "fonts/source-sans-pro-regular",
/// ("woff2", "woff")
/// ) {
/// font-style: normal;
/// font-weight: 400;
/// }
///
/// // CSS Output
/// @font-face {
/// font-family: "source-sans-pro";
/// src: url("fonts/source-sans-pro-regular.woff2") format("woff2"),
/// url("fonts/source-sans-pro-regular.woff") format("woff");
/// font-style: normal;
/// font-weight: 400;
/// }
///
/// @require {function} _font-source-declaration
///
/// @require {function} _fetch-bourbon-setting
@mixin font-face(
$font-family,
$file-path,
$file-formats: _fetch-bourbon-setting("global-font-file-formats"),
$asset-pipeline: _fetch-bourbon-setting("rails-asset-pipeline")
) {
@font-face {
font-family: $font-family;
src: _font-source-declaration(
$font-family,
$file-path,
$asset-pipeline,
$file-formats
);
@content;
}
}
================================================
FILE: core/bourbon/library/_font-stacks.scss
================================================
@charset "UTF-8";
/// A variable that outputs a Helvetica font stack.
///
/// @link https://goo.gl/uSJvZe
///
/// @type list
///
/// @example scss
/// .element {
/// font-family: $font-stack-helvetica;
/// }
///
/// // CSS Output
/// .element {
/// font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
/// }
$font-stack-helvetica: (
"Helvetica Neue",
"Helvetica",
"Arial",
sans-serif,
);
/// A variable that outputs a Lucida Grande font stack.
///
/// @link https://goo.gl/R5UyYE
///
/// @type list
///
/// @example scss
/// .element {
/// font-family: $font-stack-lucida-grande;
/// }
///
/// // CSS Output
/// .element {
/// font-family: "Lucida Grande", "Lucida Sans Unicode", "Geneva", "Verdana", sans-serif;
/// }
$font-stack-lucida-grande: (
"Lucida Grande",
"Lucida Sans Unicode",
"Geneva",
"Verdana",
sans-serif,
);
/// A variable that outputs a Verdana font stack.
///
/// @link https://goo.gl/yGXWSS
///
/// @type list
///
/// @example scss
/// .element {
/// font-family: $font-stack-verdana;
/// }
///
/// // CSS Output
/// .element {
/// font-family: "Verdana", "Geneva", sans-serif;
/// }
$font-stack-verdana: (
"Verdana",
"Geneva",
sans-serif,
);
/// A variable that outputs a system font stack.
///
/// @type list
///
/// @example scss
/// .element {
/// font-family: $font-stack-system;
/// }
///
/// // CSS Output
/// .element {
/// font-family: system-ui, -apple-system, BlinkMacSystemFont, "Avenir Next", "Avenir", "Segoe UI", "Lucida Grande", "Helvetica Neue", "Helvetica", "Fira Sans", "Roboto", "Noto", "Droid Sans", "Cantarell", "Oxygen", "Ubuntu", "Franklin Gothic Medium", "Century Gothic", "Liberation Sans", sans-serif;
/// }
$font-stack-system: (
system-ui,
-apple-system,
BlinkMacSystemFont,
"Avenir Next",
"Avenir",
"Segoe UI",
"Lucida Grande",
"Helvetica Neue",
"Helvetica",
"Fira Sans",
"Roboto",
"Noto",
"Droid Sans",
"Cantarell",
"Oxygen",
"Ubuntu",
"Franklin Gothic Medium",
"Century Gothic",
"Liberation Sans",
sans-serif,
);
/// A variable that outputs a Garamond font stack.
///
/// @link https://goo.gl/QQFEkV
///
/// @type list
///
/// @example scss
/// .element {
/// font-family: $font-stack-garamond;
/// }
///
/// // CSS Output
/// .element {
/// font-family: "Garamond", "Baskerville", "Baskerville Old Face", "Hoefler Text", "Times New Roman", serif;
/// }
$font-stack-garamond: (
"Garamond",
"Baskerville",
"Baskerville Old Face",
"Hoefler Text",
"Times New Roman",
serif,
);
/// A variable that outputs a Georgia font stack.
///
/// @link https://goo.gl/wtzVPy
///
/// @type list
///
/// @example scss
/// .element {
/// font-family: $font-stack-georgia;
/// }
///
/// // CSS Output
/// .element {
/// font-family: "Georgia", "Times", "Times New Roman", serif;
/// }
$font-stack-georgia: (
"Georgia",
"Times",
"Times New Roman",
serif,
);
/// A variable that outputs a Hoefler Text font stack.
///
/// @link https://goo.gl/n7U7zx
///
/// @type list
///
/// @example scss
/// .element {
/// font-family: $font-stack-hoefler-text;
/// }
///
/// // CSS Output
/// .element {
/// font-family: "Hoefler Text", "Baskerville Old Face", "Garamond", "Times New Roman", serif;
/// }
$font-stack-hoefler-text: (
"Hoefler Text",
"Baskerville Old Face",
"Garamond",
"Times New Roman",
serif,
);
/// A variable that outputs a Consolas font stack.
///
/// @link https://goo.gl/iKrtqv
///
/// @type list
///
/// @example scss
/// .element {
/// font-family: $font-stack-consolas;
/// }
///
/// // CSS Output
/// .element {
/// font-family: "Consolas", "monaco", monospace;
/// }
$font-stack-consolas: (
"Consolas",
"monaco",
monospace,
);
/// A variable that outputs a Courier New font stack.
///
/// @link https://goo.gl/bHfWMP
///
/// @type list
///
/// @example scss
/// .element {
/// font-family: $font-stack-courier-new;
/// }
///
/// // CSS Output
/// .element {
/// font-family: "Courier New", "Courier", "Lucida Sans Typewriter", "Lucida Typewriter", monospace;
/// }
$font-stack-courier-new: (
"Courier New",
"Courier",
"Lucida Sans Typewriter",
"Lucida Typewriter",
monospace,
);
/// A variable that outputs a Monaco font stack.
///
/// @link https://goo.gl/9PgKDO
///
/// @type list
///
/// @example scss
/// .element {
/// font-family: $font-stack-monaco;
/// }
///
/// // CSS Output
/// .element {
/// font-family: "Monaco", "Consolas", "Lucida Console", monospace;
/// }
$font-stack-monaco: (
"Monaco",
"Consolas",
"Lucida Console",
monospace,
);
================================================
FILE: core/bourbon/library/_hide-text.scss
================================================
@charset "UTF-8";
/// Hides the text in an element, commonly used to show an image instead. Some
/// elements will need block-level styles applied.
///
/// @link https://goo.gl/EvLRIu
///
/// @example scss
/// .element {
/// @include hide-text;
/// }
///
/// // CSS Output
/// .element {
/// overflow: hidden;
/// text-indent: 101%;
/// white-space: nowrap;
/// }
@mixin hide-text {
overflow: hidden;
text-indent: 101%;
white-space: nowrap;
}
================================================
FILE: core/bourbon/library/_hide-visually.scss
================================================
@charset "UTF-8";
/// Hides an element visually while still allowing the content to be accessible
/// to assistive technology, e.g. screen readers. Passing `unhide` will reverse
/// the affects of the hiding, which is handy for showing the element on focus,
/// for example.
///
/// @link https://goo.gl/Vf1TGn
///
/// @argument {string} $toggle [hide]
/// Accepts `hide` or `unhide`. `unhide` reverses the affects of `hide`.
///
/// @example scss
/// .element {
/// @include hide-visually;
///
/// &:active,
/// &:focus {
/// @include hide-visually("unhide");
/// }
/// }
///
/// // CSS Output
/// .element {
/// border: 0;
/// clip: rect(1px, 1px, 1px, 1px);
/// clip-path: inset(100%);
/// height: 1px;
/// overflow: hidden;
/// padding: 0;
/// position: absolute;
/// width: 1px;
/// }
///
/// .hide-visually:active,
/// .hide-visually:focus {
/// clip: auto;
/// clip-path: none;
/// height: auto;
/// overflow: visible;
/// position: static;
/// width: auto;
/// }
///
/// @since 5.0.0
@mixin hide-visually($toggle: "hide") {
@if not index("hide" "unhide", $toggle) {
@error "`#{$toggle}` is not a valid value for the `$toggle` argument in " +
"the `hide-visually` mixin. Must be either `hide` or `unhide`.";
} @else if $toggle == "hide" {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(100%);
height: 1px;
overflow: hidden;
padding: 0;
position: absolute;
white-space: nowrap;
width: 1px;
} @else if $toggle == "unhide" {
clip: auto;
clip-path: none;
height: auto;
overflow: visible;
position: static;
white-space: inherit;
width: auto;
}
}
================================================
FILE: core/bourbon/library/_margin.scss
================================================
@charset "UTF-8";
/// Provides a concise, one-line method for setting `margin` on specific edges
/// of a box. Use a `null` value to “skip” edges of the box with standard
/// CSS shorthand.
///
/// @argument {list} $values
/// List of margin values; accepts CSS shorthand.
///
/// @example scss
/// .element {
/// @include margin(null auto);
/// }
///
/// // CSS Output
/// .element {
/// margin-left: auto;
/// margin-right: auto;
/// }
///
/// @example scss
/// .element {
/// @include margin(10px 3em 20vh null);
/// }
///
/// // CSS Output
/// .element {
/// margin-bottom: 20vh;
/// margin-right: 3em;
/// margin-top: 10px;
/// }
///
/// @require {mixin} _directional-property
@mixin margin($values) {
@include _directional-property(margin, null, $values);
}
================================================
FILE: core/bourbon/library/_modular-scale.scss
================================================
@charset "UTF-8";
/// Increments up or down a defined scale and returns an adjusted value. This
/// helps establish consistent measurements and spacial relationships throughout
/// your project. We provide a list of commonly used scales as
/// [pre-defined variables][scales].
///
/// [scales]: https://github.com/thoughtbot/bourbon/blob/master/core/bourbon/helpers/_scales.scss
///
/// @argument {number (unitless)} $increment
/// How many steps to increment up or down the scale.
///
/// @argument {number (with unit) | list} $value [1em]
/// The base value the scale starts at. Can also be set globally using the
/// `modular-scale-base` key in the Bourbon settings.
///
/// @argument {number (unitless)} $ratio [1.25]
/// The ratio the scale is built on. Can also be set globally using the
/// `modular-scale-ratio` key in the Bourbon settings.
///
/// @return {number (with unit)}
///
/// @example scss
/// .element {
/// font-size: modular-scale(2);
/// }
///
/// // CSS Output
/// .element {
/// font-size: 1.5625em;
/// }
///
/// @example scss
/// .element {
/// margin-right: modular-scale(3, 2em);
/// }
///
/// // CSS Output
/// .element {
/// margin-right: 3.90625em;
/// }
///
/// @example scss
/// .element {
/// font-size: modular-scale(3, 1em 1.6em, $major-seventh);
/// }
///
/// // CSS Output
/// .element {
/// font-size: 3em;
/// }
///
/// @example scss
/// // Globally change the base ratio
/// $bourbon: (
/// "modular-scale-ratio": 1.2,
/// );
///
/// .element {
/// font-size: modular-scale(3);
/// }
///
/// // CSS Output
/// .element {
/// font-size: 1.728em;
/// }
///
/// @require {function} _fetch-bourbon-setting
@function modular-scale(
$increment,
$value: _fetch-bourbon-setting("modular-scale-base"),
$ratio: _fetch-bourbon-setting("modular-scale-ratio")
) {
$v1: nth($value, 1);
$v2: nth($value, length($value));
$value: $v1;
// scale $v2 to just above $v1
@while $v2 > $v1 {
$v2: ($v2 / $ratio); // will be off-by-1
}
@while $v2 < $v1 {
$v2: ($v2 * $ratio); // will fix off-by-1
}
// check AFTER scaling $v2 to prevent double-counting corner-case
$double-stranded: $v2 > $v1;
@if $increment > 0 {
@for $i from 1 through $increment {
@if $double-stranded and ($v1 * $ratio) > $v2 {
$value: $v2;
$v2: ($v2 * $ratio);
} @else {
$v1: ($v1 * $ratio);
$value: $v1;
}
}
}
@if $increment < 0 {
// adjust $v2 to just below $v1
@if $double-stranded {
$v2: ($v2 / $ratio);
}
@for $i from $increment through -1 {
@if $double-stranded and ($v1 / $ratio) < $v2 {
$value: $v2;
$v2: ($v2 / $ratio);
} @else {
$v1: ($v1 / $ratio);
$value: $v1;
}
}
}
@return $value;
}
================================================
FILE: core/bourbon/library/_overflow-wrap.scss
================================================
@charset "UTF-8";
/// Outputs the `overflow-wrap` property and its legacy name `word-wrap` to
/// support browsers that do not yet use `overflow-wrap`.
///
/// @argument {string} $wrap [break-word]
/// Accepted CSS values are `normal`, `break-word`, `inherit`, `initial`,
/// or `unset`.
///
/// @example scss
/// .wrapper {
/// @include overflow-wrap;
/// }
///
/// // CSS Output
/// .wrapper {
/// word-wrap: break-word;
/// overflow-wrap: break-word;
/// }
@mixin overflow-wrap($wrap: break-word) {
word-wrap: $wrap;
// stylelint-disable-next-line order/properties-alphabetical-order
overflow-wrap: $wrap;
}
================================================
FILE: core/bourbon/library/_padding.scss
================================================
@charset "UTF-8";
/// Provides a concise method for targeting `padding` on specific sides of a
/// box. Use a `null` value to “skip” a side.
///
/// @argument {list} $values
/// List of padding values; accepts CSS shorthand.
///
/// @example scss
/// .element-one {
/// @include padding(null 1rem);
/// }
///
/// // CSS Output
/// .element-one {
/// padding-left: 1rem;
/// padding-right: 1rem;
/// }
///
/// @example scss
/// .element-two {
/// @include padding(10vh null 10px 5%);
/// }
///
/// // CSS Output
/// .element-two {
/// padding-bottom: 10px;
/// padding-left: 5%;
/// padding-top: 10vh;
/// }
///
/// @require {mixin} _directional-property
@mixin padding($values) {
@include _directional-property(padding, null, $values);
}
================================================
FILE: core/bourbon/library/_position.scss
================================================
@charset "UTF-8";
/// Provides a concise, one-line method for setting an element’s positioning
/// properties: `position`, `top`, `right`, `bottom` and `left`. Use a `null`
/// value to “skip” an edge of the box.
///
/// @argument {string} $position
/// A CSS position value.
///
/// @argument {list} $box-edge-values
/// List of lengths; accepts CSS shorthand.
///
/// @example scss
/// .element {
/// @include position(relative, 0 null null 10em);
/// }
///
/// // CSS Output
/// .element {
/// left: 10em;
/// position: relative;
/// top: 0;
/// }
///
/// @example scss
/// .element {
/// @include position(absolute, 0);
/// }
///
/// // CSS Output
/// .element {
/// position: absolute;
/// top: 0;
/// right: 0;
/// bottom: 0;
/// left: 0;
/// }
///
/// @require {function} _is-length
///
/// @require {function} _unpack-shorthand
@mixin position(
$position,
$box-edge-values
) {
$box-edge-values: _unpack-shorthand($box-edge-values);
$offsets: (
"top": nth($box-edge-values, 1),
"right": nth($box-edge-values, 2),
"bottom": nth($box-edge-values, 3),
"left": nth($box-edge-values, 4),
);
position: $position;
@each $offset, $value in $offsets {
@if _is-length($value) {
#{$offset}: $value;
}
}
}
================================================
FILE: core/bourbon/library/_prefixer.scss
================================================
@charset "UTF-8";
/// Generates vendor prefixes.
///
/// @argument {string} $property
/// Property to prefix.
///
/// @argument {string} $value
/// Value to use.
///
/// @argument {list} $prefixes
/// Vendor prefixes to output.
///
/// @example scss
/// .element {
/// @include prefixer(appearance, none, ("webkit", "moz"));
/// }
///
/// // CSS Output
/// .element {
/// -webkit-appearance: none;
/// -moz-appearance: none;
/// appearance: none;
/// }
///
/// @author Hugo Giraudel
@mixin prefixer(
$property,
$value,
$prefixes: ()
) {
@each $prefix in $prefixes {
#{"-" + $prefix + "-" + $property}: $value;
}
#{$property}: $value;
}
================================================
FILE: core/bourbon/library/_shade.scss
================================================
@charset "UTF-8";
/// Mixes a color with black.
///
/// @argument {color} $color
///
/// @argument {number (percentage)} $percent
/// The amount of black to be mixed in.
///
/// @return {color}
///
/// @example scss
/// .element {
/// background-color: shade(#ffbb52, 60%);
/// }
///
/// // CSS Output
/// .element {
/// background-color: #664a20;
/// }
@function shade(
$color,
$percent
) {
@if not _is-color($color) {
@error "`#{$color}` is not a valid color for the `$color` argument in " +
"the `shade` mixin.";
} @else {
@return mix(#000, $color, $percent);
}
}
================================================
FILE: core/bourbon/library/_size.scss
================================================
@charset "UTF-8";
/// Sets the `width` and `height` of the element in one statement.
///
/// @argument {number (with unit) | string} $width
///
/// @argument {number (with unit) | string} $height [$width]
///
/// @example scss
/// .first-element {
/// @include size(2em);
/// }
///
/// // CSS Output
/// .first-element {
/// width: 2em;
/// height: 2em;
/// }
///
/// @example scss
/// .second-element {
/// @include size(auto, 10em);
/// }
///
/// // CSS Output
/// .second-element {
/// width: auto;
/// height: 10em;
/// }
///
/// @require {function} _is-size
@mixin size(
$width,
$height: $width
) {
@if _is-size($height) {
height: $height;
} @else {
@error "`#{$height}` is not a valid length for the `$height` argument " +
"in the `size` mixin.";
}
@if _is-size($width) {
width: $width;
} @else {
@error "`#{$width}` is not a valid length for the `$width` argument " +
"in the `size` mixin.";
}
}
================================================
FILE: core/bourbon/library/_strip-unit.scss
================================================
@charset "UTF-8";
/// Strips the unit from a number.
///
/// @argument {number} $value
///
/// @return {number (unitless)}
///
/// @example scss
/// $dimension: strip-unit(10em);
///
/// // Output
/// $dimension: 10;
@function strip-unit($value) {
@return ($value / ($value * 0 + 1));
}
================================================
FILE: core/bourbon/library/_text-inputs.scss
================================================
@charset "UTF-8";
////
/// @type list
///
/// @require {function} _assign-inputs
///
/// @require {variable} $_text-inputs-list
////
/// A list of all _text-based_ HTML inputs. Please note that you must
/// interpolate the variable (`#{}`) to use it as a selector.
///
/// @example scss
/// #{$all-text-inputs} {
/// border: 1px solid #ccc;
/// }
///
/// // CSS Output
/// [type='color'],
/// [type='date'],
/// [type='datetime'],
/// [type='datetime-local'],
/// [type='email'],
/// [type='month'],
/// [type='number'],
/// [type='password'],
/// [type='search'],
/// [type='tel'],
/// [type='text'],
/// [type='time'],
/// [type='url'],
/// [type='week'],
/// input:not([type]),
/// textarea {
/// border: 1px solid #ccc;
/// }
$all-text-inputs: _assign-inputs($_text-inputs-list);
/// A list of all _text-based_ HTML inputs with the `:active` pseudo-class
/// applied. Please note that you must interpolate the variable (`#{}`) to use
/// it as a selector.
///
/// @example scss
/// #{$all-text-inputs-active} {
/// border: 1px solid #aaa;
/// }
///
/// // CSS Output
/// [type='color']:active,
/// [type='date']:active,
/// [type='datetime']:active,
/// [type='datetime-local']:active,
/// [type='email']:active,
/// [type='month']:active,
/// [type='number']:active,
/// [type='password']:active,
/// [type='search']:active,
/// [type='tel']:active,
/// [type='text']:active,
/// [type='time']:active,
/// [type='url']:active,
/// [type='week']:active,
/// input:not([type]):active,
/// textarea:active {
/// border: 1px solid #aaa;
/// }
$all-text-inputs-active: _assign-inputs($_text-inputs-list, active);
/// A list of all _text-based_ HTML inputs with the `:focus` pseudo-class
/// applied. Please note that you must interpolate the variable (`#{}`) to use
/// it as a selector.
///
/// @example scss
/// #{$all-text-inputs-focus} {
/// border: 1px solid #1565c0;
/// }
///
/// // CSS Output
/// [type='color']:focus,
/// [type='date']:focus,
/// [type='datetime']:focus,
/// [type='datetime-local']:focus,
/// [type='email']:focus,
/// [type='month']:focus,
/// [type='number']:focus,
/// [type='password']:focus,
/// [type='search']:focus,
/// [type='tel']:focus,
/// [type='text']:focus,
/// [type='time']:focus,
/// [type='url']:focus,
/// [type='week']:focus,
/// input:not([type]):focus,
/// textarea:focus {
/// border: 1px solid #1565c0;
/// }
$all-text-inputs-focus: _assign-inputs($_text-inputs-list, focus);
/// A list of all _text-based_ HTML inputs with the `:hover` pseudo-class
/// applied. Please note that you must interpolate the variable (`#{}`) to use
/// it as a selector.
///
/// @example scss
/// #{$all-text-inputs-hover} {
/// border: 1px solid #aaa;
/// }
///
/// // CSS Output
/// [type='color']:hover,
/// [type='date']:hover,
/// [type='datetime']:hover,
/// [type='datetime-local']:hover,
/// [type='email']:hover,
/// [type='month']:hover,
/// [type='number']:hover,
/// [type='password']:hover,
/// [type='search']:hover,
/// [type='tel']:hover,
/// [type='text']:hover,
/// [type='time']:hover,
/// [type='url']:hover,
/// [type='week']:hover,
/// input:not([type]):hover,
/// textarea:hover {
/// border: 1px solid #aaa;
/// }
$all-text-inputs-hover: _assign-inputs($_text-inputs-list, hover);
/// A list of all _text-based_ HTML inputs with the `:invalid` pseudo-class
/// applied. Please note that you must interpolate the variable (`#{}`) to use
/// it as a selector.
///
/// @example scss
/// #{$all-text-inputs-invalid} {
/// border: 1px solid #00f;
/// }
///
/// // CSS Output
/// [type='color']:invalid,
/// [type='date']:invalid,
/// [type='datetime']:invalid,
/// [type='datetime-local']:invalid,
/// [type='email']:invalid,
/// [type='month']:invalid,
/// [type='number']:invalid,
/// [type='password']:invalid,
/// [type='search']:invalid,
/// [type='tel']:invalid,
/// [type='text']:invalid,
/// [type='time']:invalid,
/// [type='url']:invalid,
/// [type='week']:invalid,
/// input:not([type]):invalid,
/// textarea:invalid {
/// border: 1px solid #00f;
/// }
$all-text-inputs-invalid: _assign-inputs($_text-inputs-list, invalid);
================================================
FILE: core/bourbon/library/_timing-functions.scss
================================================
@charset "UTF-8";
////
/// CSS cubic-bezier timing functions.
///
/// @link https://goo.gl/p8u6SK
///
/// @type string
////
$ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
$ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
$ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22);
$ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06);
$ease-in-sine: cubic-bezier(0.47, 0, 0.745, 0.715);
$ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
$ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335);
$ease-in-back: cubic-bezier(0.6, -0.28, 0.735, 0.045);
$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
$ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
$ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
$ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
$ease-out-sine: cubic-bezier(0.39, 0.575, 0.565, 1);
$ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
$ease-out-circ: cubic-bezier(0.075, 0.82, 0.165, 1);
$ease-out-back: cubic-bezier(0.175, 0.885, 0.32, 1.275);
$ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);
$ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
$ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
$ease-in-out-quint: cubic-bezier(0.86, 0, 0.07, 1);
$ease-in-out-sine: cubic-bezier(0.445, 0.05, 0.55, 0.95);
$ease-in-out-expo: cubic-bezier(1, 0, 0, 1);
$ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.15, 0.86);
$ease-in-out-back: cubic-bezier(0.68, -0.55, 0.265, 1.55);
================================================
FILE: core/bourbon/library/_tint.scss
================================================
@charset "UTF-8";
/// Mixes a color with white.
///
/// @argument {color} $color
///
/// @argument {number (percentage)} $percent
/// The amount of white to be mixed in.
///
/// @return {color}
///
/// @example scss
/// .element {
/// background-color: tint(#6ecaa6, 40%);
/// }
///
/// // CSS Output
/// .element {
/// background-color: #a8dfc9;
/// }
@function tint(
$color,
$percent
) {
@if not _is-color($color) {
@error "`#{$color}` is not a valid color for the `$color` argument in " +
"the `tint` mixin.";
} @else {
@return mix(#fff, $color, $percent);
}
}
================================================
FILE: core/bourbon/library/_triangle.scss
================================================
@charset "UTF-8";
/// Generates a triangle pointing in a specified direction.
///
/// @argument {string} $direction
/// The direction the triangle should point. Accepts `up`, `up-right`,
/// `right`, `down-right`, `down`, `down-left`, `left` or `up-left`.
///
/// @argument {number (with unit)} $width
/// Width of the triangle.
///
/// @argument {number (with unit)} $height
/// Height of the triangle.
///
/// @argument {color} $color
/// Color of the triangle.
///
/// @example scss
/// .element {
/// &::before {
/// @include triangle("up", 2rem, 1rem, #b25c9c);
/// content: "";
/// }
/// }
///
/// // CSS Output
/// .element::before {
/// border-style: solid;
/// height: 0;
/// width: 0;
/// border-color: transparent transparent #b25c9c;
/// border-width: 0 1rem 1rem;
/// content: "";
/// }
@mixin triangle(
$direction,
$width,
$height,
$color
) {
@if not index(
"up" "up-right" "right" "down-right" "down" "down-left" "left" "up-left",
$direction
) {
@error "Direction must be `up`, `up-right`, `right`, `down-right`, " +
"`down`, `down-left`, `left` or `up-left`.";
} @else if not _is-color($color) {
@error "`#{$color}` is not a valid color for the `$color` argument in " +
"the `triangle` mixin.";
} @else {
border-style: solid;
height: 0;
width: 0;
@if $direction == "up" {
border-color: transparent transparent $color;
border-width: 0 ($width / 2) $height;
} @else if $direction == "up-right" {
border-color: transparent $color transparent transparent;
border-width: 0 $width $width 0;
} @else if $direction == "right" {
border-color: transparent transparent transparent $color;
border-width: ($height / 2) 0 ($height / 2) $width;
} @else if $direction == "down-right" {
border-color: transparent transparent $color;
border-width: 0 0 $width $width;
} @else if $direction == "down" {
border-color: $color transparent transparent;
border-width: $height ($width / 2) 0;
} @else if $direction == "down-left" {
border-color: transparent transparent transparent $color;
border-width: $width 0 0 $width;
} @else if $direction == "left" {
border-color: transparent $color transparent transparent;
border-width: ($height / 2) $width ($height / 2) 0;
} @else if $direction == "up-left" {
border-color: $color transparent transparent;
border-width: $width $width 0 0;
}
}
}
================================================
FILE: core/bourbon/library/_value-prefixer.scss
================================================
@charset "UTF-8";
/// Generates vendor prefixes for values.
///
/// @argument {string} $property
/// Property to use.
///
/// @argument {string} $value
/// Value to prefix.
///
/// @argument {list} $prefixes
/// Vendor prefixes to output.
///
/// @example scss
/// .element {
/// @include value-prefixer(cursor, grab, ("webkit", "moz"));
/// }
///
/// // CSS Output
/// .element {
/// cursor: -webkit-grab;
/// cursor: -moz-grab;
/// cursor: grab;
/// }
///
/// @author Matthew Tobiasz
@mixin value-prefixer(
$property,
$value,
$prefixes: ()
) {
@each $prefix in $prefixes {
#{$property}: #{"-" + $prefix + "-" + $value};
}
#{$property}: $value;
}
================================================
FILE: core/bourbon/settings/_settings.scss
================================================
@charset "UTF-8";
/// Default global Bourbon settings. Values in this map are overwritten by any
/// values set in the `$bourbon` map.
///
/// @type map
///
/// @property {color} contrast-switch-dark-color [#000]
/// Global dark color for the `contrast-switch` function.
///
/// @property {color} contrast-switch-light-color [#fff]
/// Global light color for the `contrast-switch` function.
///
/// @property {list} global-font-file-formats [("woff2", "woff")]
/// Global font file formats for the `font-face` mixin.
///
/// @property {number (with unit)} modular-scale-base [1em]
/// Global base value for the `modular-scale` function.
///
/// @property {number (unitless)} modular-scale-ratio [$major-third (1.25)]
/// Global base ratio for the `modular-scale` function.
///
/// @property {boolean} rails-asset-pipeline [false]
/// Set this to `true` when using the Rails Asset Pipeline and Bourbon will
/// write asset paths using
/// [sass-rails’ asset helpers](https://github.com/rails/sass-rails#asset-helpers).
///
/// @access private
$_bourbon-defaults: (
"contrast-switch-dark-color": #000,
"contrast-switch-light-color": #fff,
"global-font-file-formats": ("woff2", "woff"),
"modular-scale-base": 1em,
"modular-scale-ratio": $major-third,
"rails-asset-pipeline": false,
);
/// Global Bourbon settings.
///
/// @name Settings
///
/// @type map
///
/// @property {color} contrast-switch-dark-color [#000]
/// Global dark color for the `contrast-switch` function.
///
/// @property {color} contrast-switch-light-color [#fff]
/// Global light color for the `contrast-switch` function.
///
/// @property {list} global-font-file-formats [("woff2", "woff")]
/// Global font file formats for the `font-face` mixin.
///
/// @property {number (with unit)} modular-scale-base [1em]
/// Global base value for the `modular-scale` function.
///
/// @property {number (unitless)} modular-scale-ratio [$major-third (1.25)]
/// Global base ratio for the `modular-scale` function.
///
/// @property {boolean} rails-asset-pipeline [false]
/// Set this to `true` when using the Rails Asset Pipeline and Bourbon will
/// write asset paths using
/// [sass-rails’ asset helpers](https://github.com/rails/sass-rails#asset-helpers).
///
/// @example scss
/// $bourbon: (
/// "contrast-switch-dark-color": #000,
/// "contrast-switch-light-color": #fff,
/// "global-font-file-formats": ("woff2", "woff"),
/// "modular-scale-base": 1em,
/// "modular-scale-ratio": $major-third,
/// "rails-asset-pipeline": false,
/// );
$bourbon: () !default;
================================================
FILE: core/bourbon/utilities/_assign-inputs.scss
================================================
@charset "UTF-8";
/// Append pseudo-classes to a selector(s).
///
/// @argument {list | string} $inputs
/// A selector, or list of selectors, to apply the pseudo-class to.
///
/// @argument {pseudo-class} $pseudo [null]
/// The pseudo-class to be appended.
///
/// @return {list}
///
/// @access private
@function _assign-inputs(
$inputs,
$pseudo: null
) {
$list: ();
@each $input in $inputs {
$input: unquote($input);
$input: if($pseudo, $input + ":" + $pseudo, $input);
$list: append($list, $input, comma);
}
@return $list;
}
================================================
FILE: core/bourbon/utilities/_compact-shorthand.scss
================================================
@charset "UTF-8";
/// Transforms shorthand to its shortest possible form.
///
/// @argument {list} $values
/// List of directional values.
///
/// @example scss
/// $values: _compact-shorthand(10px 20px 10px 20px);
///
/// // Output
/// $values: 10px 20px;
///
/// @return {list}
///
/// @access private
@function _compact-shorthand($values) {
$output: null;
$a: nth($values, 1);
$b: if(length($values) < 2, $a, nth($values, 2));
$c: if(length($values) < 3, $a, nth($values, 3));
$d: if(length($values) < 2, $a, nth($values, if(length($values) < 4, 2, 4)));
@if $a == 0 { $a: 0; }
@if $b == 0 { $b: 0; }
@if $c == 0 { $c: 0; }
@if $d == 0 { $d: 0; }
@if $a == $b and $a == $c and $a == $d {
$output: $a;
} @else if $a == $c and $b == $d {
$output: $a $b;
} @else if $b == $d {
$output: $a $b $c;
} @else {
$output: $a $b $c $d;
}
@return $output;
}
================================================
FILE: core/bourbon/utilities/_contrast-ratio.scss
================================================
@charset "UTF-8";
/// Programatically determines the contrast ratio between two colors.
///
/// Note that the alpha channel is ignored.
///
/// @link https://goo.gl/54htLV
///
/// @argument {color (hex)} $color-1
///
/// @argument {color (hex)} $color-2
///
/// @return {number (1-21)}
///
/// @example scss
/// _contrast-ratio(black, white)
///
/// @require {function} _lightness
///
/// @access private
@function _contrast-ratio($color-1, $color-2) {
$-local-lightness-1: _lightness($color-1) + 0.05;
$-local-lightness-2: _lightness($color-2) + 0.05;
@if $-local-lightness-1 > $-local-lightness-2 {
@return $-local-lightness-1 / $-local-lightness-2;
} @else {
@return $-local-lightness-2 / $-local-lightness-1;
}
}
================================================
FILE: core/bourbon/utilities/_directional-property.scss
================================================
@charset "UTF-8";
/// Builds directional properties by parsing CSS shorthand values. For example,
/// a value of `10px null` will output top and bottom directional properties,
/// but the `null` skips left and right from being output.
///
/// @argument {string} $property
/// Base property.
///
/// @argument {string} $suffix
/// Suffix to append. Use `null` to omit.
///
/// @argument {list} $values
/// List of values to set for the property.
///
/// @example scss
/// .element {
/// @include _directional-property(border, width, null 5px);
/// }
///
/// // CSS Output
/// .element {
/// border-right-width: 5px;
/// border-left-width: 5px;
/// }
///
/// @require {function} _compact-shorthand
///
/// @require {function} _contains-falsy
///
/// @access private
@mixin _directional-property(
$property,
$suffix,
$values
) {
$top: $property + "-top" + if($suffix, "-#{$suffix}", "");
$bottom: $property + "-bottom" + if($suffix, "-#{$suffix}", "");
$left: $property + "-left" + if($suffix, "-#{$suffix}", "");
$right: $property + "-right" + if($suffix, "-#{$suffix}", "");
$all: $property + if($suffix, "-#{$suffix}", "");
$values: _compact-shorthand($values);
@if _contains-falsy($values) {
@if nth($values, 1) { #{$top}: nth($values, 1); }
@if length($values) == 1 {
@if nth($values, 1) { #{$right}: nth($values, 1); }
} @else {
@if nth($values, 2) { #{$right}: nth($values, 2); }
}
@if length($values) == 2 {
@if nth($values, 1) { #{$bottom}: nth($values, 1); }
@if nth($values, 2) { #{$left}: nth($values, 2); }
} @else if length($values) == 3 {
@if nth($values, 3) { #{$bottom}: nth($values, 3); }
@if nth($values, 2) { #{$left}: nth($values, 2); }
} @else if length($values) == 4 {
@if nth($values, 3) { #{$bottom}: nth($values, 3); }
@if nth($values, 4) { #{$left}: nth($values, 4); }
}
} @else {
#{$all}: $values;
}
}
================================================
FILE: core/bourbon/utilities/_fetch-bourbon-setting.scss
================================================
@charset "UTF-8";
/// Return a Bourbon setting.
///
/// @argument {string} $setting
///
/// @return {boolean | color | list | number | string}
///
/// @example scss
/// _fetch-bourbon-setting(rails-asset-pipeline)
///
/// @access private
@function _fetch-bourbon-setting($setting) {
@return map-get(map-merge($_bourbon-defaults, $bourbon), $setting);
}
================================================
FILE: core/bourbon/utilities/_font-source-declaration.scss
================================================
@charset "UTF-8";
/// Builds the `src` list for an `@font-face` declaration.
///
/// @link https://goo.gl/Ru1bKP
///
/// @argument {string} $font-family
///
/// @argument {string} $file-path
///
/// @argument {boolean} $asset-pipeline
///
/// @argument {list} $file-formats
///
/// @return {list}
///
/// @require {function} _contains
///
/// @access private
@function _font-source-declaration(
$font-family,
$file-path,
$asset-pipeline,
$file-formats
) {
$src: ();
$formats-map: (
"woff2": "#{$file-path}.woff2" format("woff2"),
"woff": "#{$file-path}.woff" format("woff"),
);
@each $format in $file-formats {
@if _contains(map-keys($formats-map), $format) {
$value: map-get($formats-map, $format);
$file-path: nth($value, 1);
$font-format: nth($value, 2);
@if $asset-pipeline == true {
$src: append($src, font-url($file-path) $font-format, comma);
} @else {
$src: append($src, url($file-path) $font-format, comma);
}
} @else {
@error "`#{$file-formats}` contains an unsupported font file format. " +
"Must be `woff` and/or `woff2`.";
}
}
@return $src;
}
================================================
FILE: core/bourbon/utilities/_gamma.scss
================================================
@charset "UTF-8";
/// Performs gamma correction on a single color channel.
///
/// Note that the calculation is approximate if a `pow()` is not available.
///
/// @argument {number (0-1)} $channel
///
/// @return {number (0-1)}
///
/// @access private
@function _gamma($channel) {
@if $channel < 0.03928 {
@return $channel / 12.92;
} @else {
$c: ($channel + 0.055) / 1.055;
@if function-exists("pow") {
@return pow($c, 2.4);
} @else {
@return 0.56 * $c * $c * $c + 0.44 * $c * $c;
}
}
}
================================================
FILE: core/bourbon/utilities/_lightness.scss
================================================
@charset "UTF-8";
/// Programatically determines the lightness of a color.
///
/// @argument {color (hex)} $hex-color
///
/// @return {number (0-1)}
///
/// @example scss
/// _lightness($color)
///
/// @access private
@function _lightness($hex-color) {
$-local-red-raw: red(rgba($hex-color, 1));
$-local-green-raw: green(rgba($hex-color, 1));
$-local-blue-raw: blue(rgba($hex-color, 1));
$-local-red: _gamma($-local-red-raw / 255);
$-local-green: _gamma($-local-green-raw / 255);
$-local-blue: _gamma($-local-blue-raw / 255);
@return $-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722;
}
================================================
FILE: core/bourbon/utilities/_unpack-shorthand.scss
================================================
@charset "UTF-8";
/// Transforms shorthand that can range from 1-to-4 values to be 4 values.
///
/// @argument {list} $shorthand
///
/// @example scss
/// .element {
/// margin: _unpack-shorthand(1em 2em);
/// }
///
/// // CSS Output
/// .element {
/// margin: 1em 2em 1em 2em;
/// }
///
/// @access private
@function _unpack-shorthand($shorthand) {
@if length($shorthand) == 1 {
@return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1);
} @else if length($shorthand) == 2 {
@return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2);
} @else if length($shorthand) == 3 {
@return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2);
} @else {
@return $shorthand;
}
}
================================================
FILE: core/bourbon/validators/_contains-falsy.scss
================================================
@charset "UTF-8";
/// Checks if a list does not contain any values.
///
/// @argument {list} $list
/// The list to check against.
///
/// @return {boolean}
///
/// @access private
@function _contains-falsy($list) {
@each $item in $list {
@if not $item {
@return true;
}
}
@return false;
}
================================================
FILE: core/bourbon/validators/_contains.scss
================================================
@charset "UTF-8";
/// Checks if a list contains a value(s).
///
/// @argument {list} $list
/// The list to check against.
///
/// @argument {list} $values
/// A single value or list of values to check for.
///
/// @return {boolean}
///
/// @access private
@function _contains(
$list,
$values...
) {
@each $value in $values {
@if type-of(index($list, $value)) != "number" {
@return false;
}
}
@return true;
}
================================================
FILE: core/bourbon/validators/_is-color.scss
================================================
@charset "UTF-8";
/// Checks for a valid CSS color.
///
/// @argument {string} $color
///
/// @return {boolean}
///
/// @access private
@function _is-color($color) {
@return (type-of($color) == color) or ($color == "currentColor");
}
================================================
FILE: core/bourbon/validators/_is-length.scss
================================================
@charset "UTF-8";
/// Checks for a valid CSS length.
///
/// @argument {string} $value
///
/// @return {boolean}
///
/// @access private
@function _is-length($value) {
@return type-of($value) != "null"
and (
str-slice($value + "", 1, 4) == "calc"
or str-slice($value + "", 1, 3) == "var"
or str-slice($value + "", 1, 3) == "env"
or index(auto inherit initial 0, $value)
or (type-of($value) == "number" and not(unitless($value)))
);
}
================================================
FILE: core/bourbon/validators/_is-number.scss
================================================
@charset "UTF-8";
/// Checks for a valid number.
///
/// @argument {number} $value
///
/// @require {function} _contains
///
/// @return {boolean}
///
/// @access private
@function _is-number($value) {
@return _contains("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" 0 1 2 3 4 5 6 7 8 9, $value);
}
================================================
FILE: core/bourbon/validators/_is-size.scss
================================================
@charset "UTF-8";
/// Checks for a valid CSS size.
///
/// @argument {string} $value
///
/// @return {boolean}
///
/// @require {function} _contains
///
/// @require {function} _is-length
///
/// @access private
@function _is-size($value) {
@return _is-length($value)
or _contains("fill" "fit-content" "min-content" "max-content", $value);
}
================================================
FILE: eyeglass-exports.js
================================================
var bourbon = require("./index");
module.exports = function(eyeglass, sass) {
return {
sassDir: bourbon.includePaths[0]
};
};
================================================
FILE: features/install.feature
================================================
Feature: Install bourbon files
Scenario: Bourbon generates a new bourbon installation
When I run `bundle exec bourbon install`
Then the sass directories should have been generated
And the following directories should exist:
| bourbon |
And the master bourbon partial should have been generated
And the output should contain "Bourbon files installed to bourbon/"
Scenario: Generating does not overwrite an existing bourbon directory
Given bourbon is already installed
When I run `bundle exec bourbon install`
Then the output should contain "Bourbon files already installed, doing nothing."
Scenario: Install Bourbon into a custom path
When I run `bundle exec bourbon install --path=custom_path`
Then the sass directories with "custom_path" prefix should have been generated
And the following directories should exist:
| custom_path/bourbon |
And the master bourbon partial should have been generated within "custom_path" directory
And the output should contain "Bourbon files installed to custom_path/bourbon/"
Scenario: Forcing install of bourbon
Given bourbon is already installed
When I run `bundle exec bourbon install --force`
Then the output from "bundle exec bourbon install --force" should contain "Bourbon files installed to bourbon/"
And the output should not contain "Bourbon files already installed, doing nothing."
================================================
FILE: features/step_definitions/bourbon_steps.rb
================================================
Given /^bourbon is already installed$/ do
install_bourbon
end
Given /^I install bourbon to "([^"]*)"$/ do |path|
end
Then /^the sass directories(?: with "([^"]+)" prefix)? should have been generated$/ do |prefix|
sass_directories = [
"bourbon/helpers",
"bourbon/library",
"bourbon/settings",
"bourbon/utilities",
"bourbon/validators",
]
sass_directories.map!{ |directory| bourbon_path(prefix, directory) }
sass_directories.each do |sass_directory|
expect(sass_directory).to be_an_existing_directory
end
end
Then /^the master bourbon partial should have been generated(?: within "([^"]+)" directory)?$/ do |prefix|
expect(bourbon_path(prefix, "_bourbon.scss")).to be_an_existing_file
end
Then /^bourbon should not have been generated$/ do
expect("bourbon").not_to be_an_existing_directory
end
Then /^the output should contain the current version of Bourbon$/ do
expect(last_command_started).to have_output "Bourbon #{Bourbon::VERSION}"
end
================================================
FILE: features/support/bourbon_support.rb
================================================
module BourbonSupport
def install_bourbon(path = nil)
if path
run_simple("bundle exec bourbon install --path '#{path}'")
else
run_simple("bundle exec bourbon install")
end
end
def bourbon_path(prefix, path)
if prefix
File.join(prefix, 'bourbon', path)
else
File.join('bourbon', path)
end
end
end
World(BourbonSupport)
================================================
FILE: features/support/env.rb
================================================
require "aruba/cucumber"
================================================
FILE: features/update.feature
================================================
Feature: Update bourbon files
Scenario: Updating updates an existing bourbon install
Given bourbon is already installed
When I write to "bourbon/_bourbon.scss" with:
"""
foobar
"""
And I run `bundle exec bourbon update`
Then the output should contain "Bourbon files updated."
And the file "bourbon/_bourbon.scss" should not contain "foobar"
Scenario: Updating with a --path option
Given I install bourbon to "custom_path"
When I write to "custom_path/bourbon/_bourbon.scss" with:
"""
foobar
"""
And I run `bundle exec bourbon update`
Then the output should contain "No existing bourbon installation. Doing nothing."
When I run `bundle exec bourbon update --path custom_path`
Then the output should contain "Bourbon files updated."
And the file "custom_path/bourbon/_bourbon.scss" should not contain "foobar"
Scenario: Updating does not generate a new bourbon install
And I run `bundle exec bourbon update`
Then bourbon should not have been generated
And the output should contain "No existing bourbon installation. Doing nothing."
================================================
FILE: features/version.feature
================================================
Feature: Show version
Scenario: Viewing version
When I successfully run `bundle exec bourbon --version`
Then the output should contain the current version of Bourbon
================================================
FILE: index.js
================================================
var path = require("path");
module.exports = {
includePaths: [
path.join(__dirname, "core")
]
};
================================================
FILE: lib/bourbon/generator.rb
================================================
require "bourbon/version"
require "fileutils"
require "thor"
require "pathname"
module Bourbon
class Generator < Thor
map ["-v", "--version"] => :version
desc "install", "Install Bourbon into your project"
method_options :path => :string, :force => :boolean
def install
if bourbon_files_already_exist? && !options[:force]
puts "Bourbon files already installed, doing nothing."
else
install_files
puts "Bourbon files installed to #{install_path}/"
end
end
desc "update", "Update Bourbon"
method_options :path => :string
def update
if bourbon_files_already_exist?
remove_bourbon_directory
install_files
puts "Bourbon files updated."
else
puts "No existing bourbon installation. Doing nothing."
end
end
desc "version", "Show Bourbon version"
def version
say "Bourbon #{Bourbon::VERSION}"
end
private
def bourbon_files_already_exist?
install_path.exist?
end
def install_path
@install_path ||= if options[:path]
Pathname.new(File.join(options[:path], "bourbon"))
else
Pathname.new("bourbon")
end
end
def install_files
make_install_directory
copy_in_scss_files
end
def remove_bourbon_directory
FileUtils.rm_rf(install_path)
end
def make_install_directory
FileUtils.mkdir_p(install_path)
end
def copy_in_scss_files
FileUtils.cp_r(all_stylesheets, install_path)
end
def all_stylesheets
Dir["#{stylesheets_directory}/*"]
end
def stylesheets_directory
File.join(top_level_directory, "core")
end
def top_level_directory
File.dirname(File.dirname(File.dirname(__FILE__)))
end
end
end
================================================
FILE: lib/bourbon/version.rb
================================================
module Bourbon
VERSION = "7.3.0".freeze
end
================================================
FILE: lib/bourbon.rb
================================================
require "bourbon/generator"
module Bourbon
if defined?(Rails) && defined?(Rails::Engine)
class Engine < ::Rails::Engine
initializer "bourbon.paths", group: :all do |app|
app.config.assets.paths << File.expand_path("../core", __dir__)
end
end
else
begin
require "sass"
Sass.load_paths << File.expand_path("../core", __dir__)
rescue LoadError
end
end
end
================================================
FILE: package.json
================================================
{
"author": {
"name": "thoughtbot",
"url": "http://thoughtbot.com"
},
"bugs": {
"url": "https://github.com/thoughtbot/bourbon/issues"
},
"description": "A lightweight Sass tool set.",
"devDependencies": {
"@thoughtbot/stylelint-config": "1.1.0",
"sassdoc": "^2.5.0",
"stylelint": "10.1.0"
},
"eyeglass": {
"needs": "*",
"exports": "eyeglass-exports.js"
},
"homepage": "https://www.bourbon.io/",
"keywords": [
"css",
"eyeglass-module",
"mixins",
"sass",
"scss"
],
"license": "MIT",
"main": "index.js",
"style": "core/_bourbon.scss",
"name": "bourbon",
"repository": {
"type": "git",
"url": "https://github.com/thoughtbot/bourbon.git"
},
"scripts": {
"sassdoc": "npx sassdoc core/ --parse --verbose --strict",
"stylelint": "npx stylelint 'core/**/*.scss'",
"test": "bundle exec rake"
},
"version": "7.3.0"
}
================================================
FILE: spec/bourbon/library/border_color_spec.rb
================================================
require "spec_helper"
describe "border-color" do
before(:all) do
ParserSupport.parse_file("library/border-color")
end
context "called with one color" do
it "applies same color to all sides" do
rule = "border-color: #f00"
expect(".border-color-all").to have_rule(rule)
end
end
context "called with two colors" do
it "applies to alternating sides" do
rule = "border-color: #0f0 #00f"
expect(".border-color-alternate").to have_rule(rule)
end
end
context "called with three colors" do
it "applies second color to left and right" do
rule = "border-color: #f00 #0f0 #00f"
expect(".border-color-implied-left").to have_rule(rule)
end
end
context "called with four colors" do
it "applies different colors to all sides" do
rule = "border-color: #00f #0f0 #f00 #ff0"
expect(".border-color-explicit").to have_rule(rule)
end
end
context "called with null values" do
it "writes rules for other three" do
ruleset = "border-top-color: #0f0; " +
"border-right-color: #ff0; " +
"border-left-color: #00f;"
bad_rule = "border-bottom-color: null;"
expect(".border-color-false-third").to have_ruleset(ruleset)
expect(".border-color-false-third").to_not have_rule(bad_rule)
end
end
end
================================================
FILE: spec/bourbon/library/border_radius_spec.rb
================================================
require "spec_helper"
describe "border-radius" do
before(:all) do
ParserSupport.parse_file("library/border-radius")
end
context "called with one argument" do
it "applies to correct sides" do
top = "border-top-left-radius: 1em; " +
"border-top-right-radius: 1em;"
left = "border-bottom-left-radius: 2em; " +
"border-top-left-radius: 2em;"
right = "border-bottom-right-radius: 3em; " +
"border-top-right-radius: 3em;"
bottom = "border-bottom-left-radius: 4em; " +
"border-bottom-right-radius: 4em;"
expect(".border-top-radius").to have_ruleset(top)
expect(".border-left-radius").to have_ruleset(left)
expect(".border-right-radius").to have_ruleset(right)
expect(".border-bottom-radius").to have_ruleset(bottom)
end
end
end
================================================
FILE: spec/bourbon/library/border_style_spec.rb
================================================
require "spec_helper"
describe "border-style" do
before(:all) do
ParserSupport.parse_file("library/border-style")
end
context "called with one style" do
it "applies same style to all sides" do
rule = "border-style: solid"
expect(".border-style-all").to have_rule(rule)
end
end
context "called with two styles" do
it "applies to alternating sides" do
rule = "border-style: dotted dashed"
expect(".border-style-alternate").to have_rule(rule)
end
end
context "called with three styles" do
it "applies second style to left and right" do
rule = "border-style: dashed double solid"
expect(".border-style-implied-left").to have_rule(rule)
end
end
context "called with four styles" do
it "applies different styles to all sides" do
rule = "border-style: dotted groove ridge none"
expect(".border-style-explicit").to have_rule(rule)
end
end
context "called with null values" do
it "writes rules for other three" do
ruleset = "border-top-style: inset; " +
"border-right-style: none; " +
"border-left-style: double;"
bad_rule = "border-bottom-style: null;"
expect(".border-style-false-third").to have_ruleset(ruleset)
expect(".border-style-false-third").to_not have_rule(bad_rule)
end
end
end
================================================
FILE: spec/bourbon/library/border_width_spec.rb
================================================
require "spec_helper"
describe "border-width" do
before(:all) do
ParserSupport.parse_file("library/border-width")
end
context "called with one color" do
it "applies same width to all sides" do
rule = "border-width: 1px"
expect(".border-width-all").to have_rule(rule)
end
end
context "called with two widths" do
it "applies to alternating sides" do
rule = "border-width: 2px 3px"
expect(".border-width-alternate").to have_rule(rule)
end
end
context "called with three widths" do
it "applies second width to left and right" do
rule = "border-width: 4px 5px 6px"
expect(".border-width-implied-left").to have_rule(rule)
end
end
context "called with four widths" do
it "applies different widths to all sides" do
rule = "border-width: 7px 8px 9px 10px"
expect(".border-width-explicit").to have_rule(rule)
end
end
context "called with null values" do
it "writes rules for other three" do
ruleset = "border-top-width: 11px; " +
"border-right-width: 12px; " +
"border-left-width: 13px;"
bad_rule = "border-bottom-width: null;"
expect(".border-width-false-third").to have_ruleset(ruleset)
expect(".border-width-false-third").to_not have_rule(bad_rule)
end
end
end
================================================
FILE: spec/bourbon/library/buttons_spec.rb
================================================
require "spec_helper"
describe "buttons" do
before(:all) do
ParserSupport.parse_file("library/buttons")
@buttons_list = %w(
button
[type='button']
[type='reset']
[type='submit']
)
end
context "expands plain buttons" do
it "finds selectors" do
list = @buttons_list.join(", ")
ruleset = "content: #{list};"
expect(".all-buttons").to have_ruleset(ruleset)
end
end
context "expands active buttons" do
it "finds selectors" do
list = @buttons_list.map { |input| "#{input}:active" }
list = list.join(", ")
ruleset = "content: #{list};"
expect(".all-buttons-active").to have_ruleset(ruleset)
end
end
context "expands focus buttons" do
it "finds selectors" do
list = @buttons_list.map { |input| "#{input}:focus" }
list = list.join(", ")
ruleset = "content: #{list};"
expect(".all-buttons-focus").to have_ruleset(ruleset)
end
end
context "expands hover buttons" do
it "finds selectors" do
list = @buttons_list.map { |input| "#{input}:hover" }
list = list.join(", ")
ruleset = "content: #{list};"
expect(".all-buttons-hover").to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/library/clearfix_spec.rb
================================================
require "spec_helper"
describe "clearfix" do
before(:all) do
ParserSupport.parse_file("library/clearfix")
end
context "called on element" do
it "adds clearfix" do
input = ".clearfix::after"
ruleset = "clear: both; " +
'content: ""; ' +
"display: block;"
expect(input).to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/library/contrast_switch_spec.rb
================================================
require "spec_helper"
describe "contrast-switch" do
before(:all) do
ParserSupport.parse_file("library/contrast-switch")
end
context "called with a light base color" do
it "outputs the dark color" do
rule = "color: #000;"
expect(".contrast-switch-light-base").to have_ruleset(rule)
end
end
context "called with a dark base color" do
it "outputs the light color" do
rule = "color: #eee;"
expect(".contrast-switch-dark-base").to have_ruleset(rule)
end
end
end
================================================
FILE: spec/bourbon/library/ellipsis_spec.rb
================================================
require "spec_helper"
describe "ellipsis" do
before(:all) do
ParserSupport.parse_file("library/ellipsis")
end
context "called on element" do
it "adds ellipsis" do
ruleset = "display: inline-block; " +
"max-width: 100%; " +
"overflow: hidden; " +
"text-overflow: ellipsis; " +
"white-space: nowrap; " +
"word-wrap: normal;"
expect(".ellipsis").to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/library/font_face_spec_1.rb
================================================
require "spec_helper"
describe "font-face" do
before(:all) do
ParserSupport.parse_file("library/font-face-1")
end
context "called with defaults" do
it "outputs defaults" do
ruleset = 'font-family: "source-sans-pro"; ' +
'src: url("/fonts/source-sans-pro/source-sans-pro-regular.woff2") format("woff2"), url("/fonts/source-sans-pro/source-sans-pro-regular.woff") format("woff");'
expect("@font-face").to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/library/font_face_spec_2.rb
================================================
require "spec_helper"
describe "font-face" do
before(:all) do
ParserSupport.parse_file("library/font-face-5")
end
context "called with additional CSS rules" do
it "outputs defaults with additional content" do
ruleset = 'font-family: "calibre"; ' +
'src: url("fonts/calibre.woff2") format("woff2"), ' +
'url("fonts/calibre.woff") format("woff"); ' +
"font-style: normal;" +
"font-weight: 600;" +
"unicode-range: U+26;"
expect("@font-face").to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/library/font_face_spec_3.rb
================================================
require "spec_helper"
describe "font-face" do
before(:all) do
ParserSupport.parse_file("library/font-face-3")
end
context "called with defaults" do
it "outputs defaults" do
ruleset = 'font-family: "pitch";' +
'src: font-url("/fonts/pitch.woff2") format("woff2");'
expect("@font-face").to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/library/font_stacks_spec.rb
================================================
require "spec_helper"
describe "font-stacks" do
before(:all) do
ParserSupport.parse_file("library/font-stacks")
end
context "stacks used in variable" do
it "output stacks" do
helvetica = '"Helvetica Neue", "Helvetica", "Arial", sans-serif'
lucida_grande = '"Lucida Grande", "Lucida Sans Unicode", ' +
'"Geneva", "Verdana", sans-serif'
verdana = '"Verdana", "Geneva", sans-serif'
garamond = '"Garamond", "Baskerville", "Baskerville Old Face", ' +
'"Hoefler Text", "Times New Roman", serif'
georgia = '"Georgia", "Times", "Times New Roman", serif'
hoefler_text = '"Hoefler Text", "Baskerville Old Face", ' +
'"Garamond", "Times New Roman", serif'
consolas = '"Consolas", "monaco", monospace'
courier_new = '"Courier New", "Courier", "Lucida Sans Typewriter", ' +
'"Lucida Typewriter", monospace'
monaco = '"Monaco", "Consolas", "Lucida Console", monospace'
system = 'system-ui, -apple-system, BlinkMacSystemFont, "Avenir Next", ' +
'"Avenir", "Segoe UI", "Lucida Grande", "Helvetica Neue", ' +
'"Helvetica", "Fira Sans", "Roboto", "Noto", "Droid Sans", ' +
'"Cantarell", "Oxygen", "Ubuntu", "Franklin Gothic Medium", ' +
'"Century Gothic", "Liberation Sans", sans-serif'
expect(".helvetica").to have_value(helvetica)
expect(".lucida-grande").to have_value(lucida_grande)
expect(".verdana").to have_value(verdana)
expect(".garamond").to have_value(garamond)
expect(".georgia").to have_value(georgia)
expect(".hoefler-text").to have_value(hoefler_text)
expect(".consolas").to have_value(consolas)
expect(".courier-new").to have_value(courier_new)
expect(".monaco").to have_value(monaco)
expect(".system").to have_value(system)
end
end
end
================================================
FILE: spec/bourbon/library/hide_text_spec.rb
================================================
require "spec_helper"
describe "hide-text" do
before(:all) do
ParserSupport.parse_file("library/hide-text")
end
context "called on element" do
it "adds hide-text" do
ruleset = "overflow: hidden; " +
"text-indent: 101%; " +
"white-space: nowrap;"
expect(".hide-text").to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/library/hide_visually_spec.rb
================================================
require "spec_helper"
describe "hide-visually" do
before(:all) do
ParserSupport.parse_file("library/hide-visually")
end
context "called on element" do
it "adds properties to hide the element" do
ruleset = "border: 0; " +
"clip: rect(1px, 1px, 1px, 1px); " +
"clip-path: inset(100%); " +
"height: 1px; " +
"overflow: hidden; " +
"padding: 0; " +
"position: absolute; " +
"white-space: nowrap; " +
"width: 1px;"
expect(".hide-visually").to have_ruleset(ruleset)
end
end
context "called with unhide argument" do
it "adds properties to reverse the hiding of the element" do
ruleset = "clip: auto; " +
"clip-path: none; " +
"height: auto; " +
"overflow: visible; " +
"position: static; " +
"white-space: inherit; " +
"width: auto;"
expect(".hide-visually--unhide").to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/library/margin_spec.rb
================================================
require "spec_helper"
describe "margin" do
before(:all) do
ParserSupport.parse_file("library/margin")
end
context "called with one size" do
it "applies same width to all sides" do
rule = "margin: 1px"
expect(".margin-all").to have_rule(rule)
end
end
context "called with two sizes" do
it "applies to alternating sides" do
rule = "margin: 2px 3px"
expect(".margin-alternate").to have_rule(rule)
end
end
context "called with three sizes" do
it "applies second width to left and right" do
rule = "margin: 4px 5px 6px"
expect(".margin-implied-left").to have_rule(rule)
end
end
context "called with four sizes" do
it "applies different widths to all sides" do
rule = "margin: 7px 8px 9px 10px"
expect(".margin-explicit").to have_rule(rule)
end
end
context "called with null values" do
it "writes rules for other three" do
ruleset = "margin-top: 11px; " +
"margin-right: 12px; " +
"margin-left: 13px;"
bad_rule = "margin-bottom: null;"
expect(".margin-false-third").to have_ruleset(ruleset)
expect(".margin-false-third").to_not have_rule(bad_rule)
end
end
end
================================================
FILE: spec/bourbon/library/modular_scale_spec.rb
================================================
require "spec_helper"
describe "modular-scale" do
before(:all) do
ParserSupport.parse_file("library/modular-scale")
end
context "called with arguments (1, $value: 2em)" do
it "outputs double the first value from the default scale" do
expect(".one-base-two").to have_rule("font-size: 2.5em")
end
end
context "called with arguments (1, $value: 3em)" do
it "outputs triple the first value from the default scale" do
expect(".one-base-three").to have_rule("font-size: 3.75em")
end
end
context "called with arguments (1, $value: 4em 6em)" do
it "outputs quadruple the first value from the default scale" do
expect(".one-double-value").to have_rule("font-size: 1.024em")
end
end
context "called with arguments (1, $ratio: $golden-ratio)" do
it "output the first value from the golden ratio scale" do
expect(".one-golden-ratio").to have_rule("font-size: 1.618em")
end
end
context "called with argument (2)" do
it "outputs the second value from the default scale" do
expect(".two-base-one").to have_rule("font-size: 1.5625em")
end
end
context "called with arguments (2, $value: 4em 6em)" do
it "outputs sextuple the second value from the default scale" do
expect(".two-double-value").to have_rule("font-size: 3.125em")
end
end
end
================================================
FILE: spec/bourbon/library/overflow_wrap_spec.rb
================================================
require "spec_helper"
describe "overflow-wrap" do
before(:all) do
ParserSupport.parse_file("library/overflow-wrap")
end
context "called on element" do
it "adds overflow-wrap and word-wrap" do
input = ".overflow-wrap"
ruleset = "word-wrap: break-word; " +
"overflow-wrap: break-word;"
expect(input).to have_ruleset(ruleset)
end
end
context "called on element with normal" do
it "sets values as normal" do
input = ".overflow-wrap-normal"
ruleset = "word-wrap: normal; " +
"overflow-wrap: normal;"
expect(input).to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/library/padding_spec.rb
================================================
require "spec_helper"
describe "padding" do
before(:all) do
ParserSupport.parse_file("library/padding")
end
context "called with one size" do
it "applies same width to all sides" do
rule = "padding: 1px"
expect(".padding-all").to have_rule(rule)
end
end
context "called with two sizes" do
it "applies to alternating sides" do
rule = "padding: 2px 3px"
expect(".padding-alternate").to have_rule(rule)
end
end
context "called with three sizes" do
it "applies second width to left and right" do
rule = "padding: 4px 5px 6px"
expect(".padding-implied-left").to have_rule(rule)
end
end
context "called with four sizes" do
it "applies different widths to all sides" do
rule = "padding: 7px 8px 9px 10px"
expect(".padding-explicit").to have_rule(rule)
end
end
context "called with null values" do
it "writes rules for other three" do
ruleset = "padding-top: 11px; " +
"padding-right: 12px; " +
"padding-left: 13px;"
bad_rule = "padding-bottom: null;"
expect(".padding-false-third").to have_ruleset(ruleset)
expect(".padding-false-third").to_not have_rule(bad_rule)
end
end
end
================================================
FILE: spec/bourbon/library/position_spec.rb
================================================
require "spec_helper"
describe "position" do
before(:all) do
ParserSupport.parse_file("library/position")
end
context "called with one size" do
it "applies same width to all sides" do
ruleset = "position: fixed; " +
"top: 1em; " +
"right: 1em; " +
"bottom: 1em; " +
"left: 1em;"
expect(".position-all").to have_ruleset(ruleset)
end
end
context "called with two sizes" do
it "applies to alternating sides" do
ruleset = "position: absolute; " +
"top: 2px; " +
"right: 3px; " +
"bottom: 2px; " +
"left: 3px;"
expect(".position-alternate").to have_ruleset(ruleset)
end
end
context "called with three sizes" do
it "applies second width to left and right" do
ruleset = "position: relative; " +
"top: 4px; " +
"right: 5px; " +
"bottom: 6px; " +
"left: 5px;"
expect(".position-implied-left").to have_ruleset(ruleset)
end
end
context "called with four sizes" do
it "applies different widths to all sides" do
ruleset = "position: fixed; " +
"top: 7px; " +
"right: 8px; " +
"bottom: 9px; " +
"left: 10px;"
expect(".position-explicit").to have_ruleset(ruleset)
end
end
context "called with null values" do
it "writes rules for others" do
ruleset = "position: static; " +
"top: 11px; " +
"left: 13px;"
bad_rule = "position-bottom: null; position-right: null;"
expect(".position-false-third").to have_ruleset(ruleset)
expect(".position-false-third").to_not have_rule(bad_rule)
end
end
end
================================================
FILE: spec/bourbon/library/prefixer_spec.rb
================================================
require "spec_helper"
describe "prefixer" do
before(:all) do
ParserSupport.parse_file("library/prefixer")
end
context "called with no prefixes" do
it "outputs the spec" do
rule = "appearance: none;"
expect(".prefix").to have_ruleset(rule)
end
end
context "called with one prefix" do
it "applies the prefix to the property" do
rule = "-webkit-appearance: none; " +
"appearance: none;"
expect(".prefix--webkit").to have_ruleset(rule)
end
end
context "called with multiple prefixes" do
it "applies the prefixes to the property" do
rule = "-moz-appearance: none; " +
"-ms-appearance: none; " +
"appearance: none;"
expect(".prefix--moz-ms").to have_ruleset(rule)
end
end
end
================================================
FILE: spec/bourbon/library/shade_spec.rb
================================================
require "spec_helper"
describe "shade" do
before(:all) do
ParserSupport.parse_file("library/shade")
end
context "called on white" do
it "shades white" do
expect(".shade-white").to have_rule("color: #404040")
end
end
context "called on black" do
it "still returns black" do
expect(".shade-black").to have_rule("color: black")
end
end
context "called on red" do
it "shades red" do
expect(".shade-red").to have_rule("color: #bf0000")
end
end
context "called on gray" do
it "shades gray" do
expect(".shade-gray").to have_rule("color: #171717")
end
end
end
================================================
FILE: spec/bourbon/library/size_spec.rb
================================================
require "spec_helper"
describe "size" do
before(:all) do
ParserSupport.parse_file("library/size")
end
context "called with one size" do
it "applies same width to both height and width" do
rule = "height: 10px; width: 10px;"
expect(".size-implicit").to have_ruleset(rule)
end
end
context "called with two sizes" do
it "applies to height and width" do
rule = "height: 2em; width: 1em;"
expect(".size-both").to have_ruleset(rule)
end
end
context "called with auto" do
it "applies to auto to height" do
rule = "height: auto; width: 100px;"
expect(".size-auto").to have_ruleset(rule)
end
end
end
================================================
FILE: spec/bourbon/library/strip_unit_spec.rb
================================================
require "spec_helper"
describe "strip-unit" do
before(:all) do
ParserSupport.parse_file("library/strip-unit")
end
context "called with px" do
it "strips units" do
expect(".px").to have_rule("width: 10")
end
end
context "called with em" do
it "strips units" do
expect(".em").to have_rule("width: 2")
end
end
context "called with rem" do
it "strips units" do
expect(".rem").to have_rule("width: 1.5")
end
end
context "called with percent" do
it "strips units" do
expect(".percent").to have_rule("width: 20")
end
end
end
================================================
FILE: spec/bourbon/library/text_inputs_spec.rb
================================================
require "spec_helper"
describe "text-inputs" do
before(:all) do
ParserSupport.parse_file("library/text-inputs")
@inputs_list = %w(
[type='color']
[type='date']
[type='datetime']
[type='datetime-local']
[type='email']
[type='month']
[type='number']
[type='password']
[type='search']
[type='tel']
[type='text']
[type='time']
[type='url']
[type='week']
input:not([type])
textarea
)
end
context "expands plain text inputs" do
it "finds selectors" do
list = @inputs_list.join(", ")
ruleset = "content: #{list};"
expect(".all-text-inputs").to have_ruleset(ruleset)
end
end
context "expands active text inputs" do
it "finds selectors" do
list = @inputs_list.map { |input| "#{input}:active" }
list = list.join(", ")
ruleset = "content: #{list};"
expect(".all-text-inputs-active").to have_ruleset(ruleset)
end
end
context "expands focus text inputs" do
it "finds selectors" do
list = @inputs_list.map { |input| "#{input}:focus" }
list = list.join(", ")
ruleset = "content: #{list};"
expect(".all-text-inputs-focus").to have_ruleset(ruleset)
end
end
context "expands hover text inputs" do
it "finds selectors" do
list = @inputs_list.map { |input| "#{input}:hover" }
list = list.join(", ")
ruleset = "content: #{list};"
expect(".all-text-inputs-hover").to have_ruleset(ruleset)
end
end
context "expands invalid text inputs" do
it "finds selectors" do
list = @inputs_list.map { |input| "#{input}:invalid" }
list = list.join(", ")
ruleset = "content: #{list};"
expect(".all-text-inputs-invalid").to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/library/tint_spec.rb
================================================
require "spec_helper"
describe "tint" do
before(:all) do
ParserSupport.parse_file("library/tint")
end
context "called on white" do
it "still returns white" do
expect(".tint-white").to have_rule("color: white")
end
end
context "called on black" do
it "tints black" do
expect(".tint-black").to have_rule("color: gray")
end
end
context "called on red" do
it "tints red" do
expect(".tint-red").to have_rule("color: #ff4040")
end
end
context "called on gray" do
it "tints gray" do
expect(".tint-gray").to have_rule("color: #c6c6c6")
end
end
end
================================================
FILE: spec/bourbon/library/triangle_spec.rb
================================================
require "spec_helper"
describe "triangle" do
before(:all) do
ParserSupport.parse_file("library/triangle")
end
context "called with defaults" do
it "outputs the properties" do
ruleset = "border-style: solid; " +
"height: 0; " +
"width: 0; " +
"border-color: transparent transparent #b25c9c; " +
"border-width: 0 1rem 1rem;"
expect(".triangle--up").to have_ruleset(ruleset)
end
end
context "called with arguments" do
it "outputs the properties" do
ruleset = "border-style: solid; " +
"height: 0; " +
"width: 0; " +
"border-color: transparent transparent transparent #aaa; " +
"border-width: 6px 0 6px 5px;"
expect(".triangle--right").to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/utilities/assign_inputs_spec.rb
================================================
require "spec_helper"
describe "assign-inputs" do
before(:all) do
ParserSupport.parse_file("utilities/assign-inputs")
@text_inputs_list = [
"[type='password']",
"[type='text']",
"textarea"
]
end
context "expands plain text inputs" do
it "finds selectors" do
@text_inputs_list.each do |input|
expect(input).to have_rule("color: #f00")
end
end
end
context "expands text inputs with pseudo classes" do
it "finds selectors" do
list = @text_inputs_list.dup
list.map! { |input| input + ":active" }
list.each do |input|
expect(input).to have_rule("color: #0f0")
end
end
end
context "expands text inputs when first in list" do
it "finds selectors" do
list = @text_inputs_list.dup
list.push "select"
list.each do |input|
expect(input).to have_rule("color: #00f")
end
end
end
context "expands text inputs when middle of list" do
it "finds selectors" do
list = @text_inputs_list.dup
list.unshift "[type=\"file\"]"
list.each do |input|
expect(input).to have_rule("color: #f0f")
end
end
end
end
================================================
FILE: spec/bourbon/utilities/compact_shorthand_spec.rb
================================================
require "spec_helper"
describe "compact-shorthand" do
before(:all) do
ParserSupport.parse_file("utilities/compact-shorthand")
end
context "compact-shorthand" do
it "returns four values unaltered" do
expect(".four-values-a").to have_rule("padding: 10px 20px 30px 40px")
end
it "returns four values when the left and right values are not equal" do
expect(".four-values-b").to have_rule("padding: 5px 10px 5px 20px")
end
it "compacts four values to two values when the top/bottom and " +
"left/right values are equal" do
expect(".two-values").to have_rule("padding: 50px 100px")
end
it "compacts four values to one value when they all match" do
expect(".one-value").to have_rule("padding: 10px")
end
it "skips null values" do
expect(".null-value").to have_rule("padding: 10px 20px")
end
end
end
================================================
FILE: spec/bourbon/utilities/contrast_ratio_spec.rb
================================================
require "spec_helper"
describe "contrast-ratio" do
before(:all) do
ParserSupport.parse_file("utilities/contrast-ratio")
end
context "calculates between white and black" do
it "outputs the contrast ratio" do
rule = "content: 21;"
expect(".contrast-ratio-black").to have_ruleset(rule)
end
end
context "calculates between white and blue" do
it "outputs the contrast ratio" do
rule = "content: 8.59247;"
expect(".contrast-ratio-blue").to have_ruleset(rule)
end
end
end
================================================
FILE: spec/bourbon/utilities/directional_property_spec.rb
================================================
require "spec_helper"
describe "directional-property" do
before(:all) do
ParserSupport.parse_file("utilities/directional-property")
end
context "directional-property" do
it "returns property and values with four distinct lengths" do
expect(".border-all").to have_rule("border-width: 2px 5px 8px 12px")
end
it "returns property and value with one length" do
expect(".border-top").to have_rule("border-top: 10px")
end
it "returns property and value with vertical and horizontal values" do
expect(".border-color").to have_rule("border-color: #fff #000")
end
it "returns properties for top and bottom margin" do
ruleset = "margin-top: 20px; " +
"margin-bottom: 10px;"
expect(".margin-null").to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/utilities/fetch_bourbon_setting_spec.rb
================================================
require "spec_helper"
describe "fetch-bourbon-setting" do
before(:all) do
ParserSupport.parse_file("utilities/fetch-bourbon-setting")
end
context "fetches the modular-scale-base setting" do
it "and returns the default value" do
expect(".test-1").to have_rule("content: 1em")
end
end
context "fetches the rails-asset-pipeline setting" do
it "and returns the user-overridden value" do
expect(".test-2").to have_rule("content: true")
end
end
context "called from the font-face mixin" do
it "outputs user-overridden font file formats" do
ruleset = 'font-family: "source-sans-pro"; ' +
'src: font-url("source-sans-pro-regular.woff2") ' +
'format("woff2"), ' +
'font-url("source-sans-pro-regular.woff") ' +
'format("woff");'
expect("@font-face").to have_ruleset(ruleset)
end
end
end
================================================
FILE: spec/bourbon/utilities/font_source_declaration_spec.rb
================================================
require "spec_helper"
describe "font-source-declaration" do
before(:all) do
ParserSupport.parse_file("utilities/font-source-declaration")
end
context "called with pipeline" do
it "returns pipeline path" do
rule = 'src: font-url("b.woff2") format("woff2"), ' +
'font-url("b.woff") format("woff")'
expect(".has-pipeline").to have_rule(rule)
end
end
context "called with no pipeline" do
it "does not return pipeline path" do
rule = 'src: url("b.woff2") format("woff2"), ' +
'url("b.woff") format("woff")'
expect(".no-pipeline").to have_rule(rule)
end
end
end
================================================
FILE: spec/bourbon/utilities/gamma_spec.rb
================================================
require "spec_helper"
describe "gamma" do
before(:all) do
ParserSupport.parse_file("utilities/gamma")
end
context "called on a color channel" do
it "outputs a gamma value between 0 and 1" do
rule = "content: 0.12168;"
expect(".gamma").to have_ruleset(rule)
end
end
context "called on a full color channel" do
it "outputs a gamma value between 0 and 1" do
rule = "content: 1;"
expect(".gamma-full").to have_ruleset(rule)
end
end
end
================================================
FILE: spec/bourbon/utilities/lightness_spec.rb
================================================
require "spec_helper"
describe "lightness" do
before(:all) do
ParserSupport.parse_file("utilities/lightness")
end
context "called on black" do
it "outputs a number between 0 and 1 to indicate lightness" do
rule = "content: 0;"
expect(".lightness-black").to have_ruleset(rule)
end
end
context "called on white" do
it "outputs a number between 0 and 1 to indicate lightness" do
rule = "content: 1;"
expect(".lightness-white").to have_ruleset(rule)
end
end
context "called on gray" do
it "outputs a number between 0 and 1 to indicate lightness" do
rule = "content: 0.20503;"
expect(".lightness-gray").to have_ruleset(rule)
end
end
end
================================================
FILE: spec/bourbon/utilities/unpack_spec.rb
================================================
require "spec_helper"
describe "unpack" do
before(:all) do
ParserSupport.parse_file("utilities/unpack")
end
context "single" do
it "unpacks four identical measurements" do
expect(".single").to have_rule("padding: 10px 10px 10px 10px")
end
end
context "double" do
it "unpacks identical measurements for top and bottom,
and different identical measurements for left and right" do
expect(".double").to have_rule("padding: 1em 2em 1em 2em")
end
end
context "triple" do
it "unpacks identical measurements for left and right" do
expect(".triple").to have_rule("padding: 10px 20px 0 20px")
end
end
context "quadruple" do
it "unpacks four distict measurements" do
expect(".quadruple").to have_rule("padding: 0 calc(1em + 10px) 20px 50px")
end
end
end
================================================
FILE: spec/bourbon/validators/contains_spec.rb
================================================
require "spec_helper"
describe "contains" do
before(:all) do
ParserSupport.parse_file("validators/contains")
end
context "called on array with single item" do
it "contains item" do
expect(".single").to have_rule("color: #fff")
end
it "doesn't contain missing item" do
expect(".single-missing").to have_rule("color: #000")
end
end
context "called with array with multiple items" do
it "contains item" do
expect(".multiple").to have_rule("color: #fff")
end
it "doesn't contain missing item" do
expect(".multiple-missing").to have_rule("color: #000")
end
end
end
================================================
FILE: spec/bourbon/validators/is_length_spec.rb
================================================
require "spec_helper"
describe "is-length" do
before(:all) do
ParserSupport.parse_file("validators/is-length")
end
context "checks if unitless integer can be represented as a length" do
it "returns false" do
expect(".integer").not_to have_rule("color: #fff")
end
end
context "checks if px can be represented as a length" do
it "returns true" do
expect(".pixels").to have_rule("color: #fff")
end
end
context "checks if em can be represented as a length" do
it "returns true" do
expect(".ems").to have_rule("color: #fff")
end
end
context "checks if percent can be represented as a length" do
it "returns true" do
expect(".percent").to have_rule("color: #fff")
end
end
context "parses calculated values" do
it "returns true" do
expect(".calc").to have_rule("color: #fff")
end
end
context "parses custom properties" do
it "returns true" do
expect(".var").to have_rule("color: #fff")
end
end
context "parses environment variables" do
it "returns true" do
expect(".env").to have_rule("color: #fff")
end
end
context "checks if strings can be represented as a length" do
it "returns false" do
expect(".string").not_to have_rule("color: #fff")
end
end
context "checks if null can be represented as a length" do
it "returns false" do
expect(".null").not_to have_rule("color: #fff")
end
end
end
================================================
FILE: spec/bourbon/validators/is_number_spec.rb
================================================
require "spec_helper"
describe "is-number" do
before(:all) do
ParserSupport.parse_file("validators/is-number")
end
context "called with integer" do
it "is a number" do
expect(".integer").to have_rule("line-height: 1")
end
end
context "called with px" do
it "is a number" do
expect(".px").to have_rule("line-height: 2px")
end
end
context "called with em" do
it "is a number" do
expect(".em").to have_rule("line-height: 3em")
end
end
context "called with rem" do
it "is a number" do
expect(".rem").to have_rule("line-height: 4rem")
end
end
context "called with percent" do
it "is a number" do
expect(".percent").to have_rule("line-height: 5%")
end
end
context "called with string" do
it "is not a number" do
expect(".string").to_not have_rule("line-height: \"stringy\"")
end
end
end
================================================
FILE: spec/bourbon/validators/is_size_spec.rb
================================================
require "spec_helper"
describe "is-size" do
before(:all) do
ParserSupport.parse_file("validators/is-size")
end
context "called with integer" do
it "is not a size" do
expect(".integer").to_not have_rule("margin-top: 1")
end
end
context "called with px" do
it "is a size" do
expect(".px").to have_rule("margin-top: 2px")
end
end
context "called with em" do
it "is a size" do
expect(".em").to have_rule("margin-top: 3em")
end
end
context "called with rem" do
it "is a size" do
expect(".rem").to have_rule("margin-top: 4rem")
end
end
context "called with percent" do
it "is a size" do
expect(".percent").to have_rule("margin-top: 5%")
end
end
context "called with string" do
it "is not a size" do
expect(".string").to_not have_rule("margin-top: \"stringy\"")
end
end
end
================================================
FILE: spec/fixtures/_setup.scss
================================================
@import "core/bourbon";
================================================
FILE: spec/fixtures/library/border-color.scss
================================================
@import "setup";
$red: #f00;
$blue: #0f0;
$green: #00f;
$purple: #ff0;
.border-color-all {
@include border-color($red);
}
.border-color-alternate {
@include border-color($blue $green);
}
.border-color-implied-left {
@include border-color($red $blue $green);
}
.border-color-explicit {
@include border-color($green $blue $red $purple);
}
.border-color-false-third {
@include border-color($blue $purple null $green);
}
================================================
FILE: spec/fixtures/library/border-radius.scss
================================================
@import "setup";
.border-top-radius {
@include border-top-radius(1em);
}
.border-left-radius {
@include border-left-radius(2em);
}
.border-right-radius {
@include border-right-radius(3em);
}
.border-bottom-radius {
@include border-bottom-radius(4em);
}
================================================
FILE: spec/fixtures/library/border-style.scss
================================================
@import "setup";
.border-style-all {
@include border-style(solid);
}
.border-style-alternate {
@include border-style(dotted dashed);
}
.border-style-implied-left {
@include border-style(dashed double solid);
}
.border-style-explicit {
@include border-style(dotted groove ridge none);
}
.border-style-false-third {
@include border-style(inset none null double);
}
================================================
FILE: spec/fixtures/library/border-width.scss
================================================
@import "setup";
.border-width-all {
@include border-width(1px);
}
.border-width-alternate {
@include border-width(2px 3px);
}
.border-width-implied-left {
@include border-width(4px 5px 6px);
}
.border-width-explicit {
@include border-width(7px 8px 9px 10px);
}
.border-width-false-third {
@include border-width(11px 12px null 13px);
}
================================================
FILE: spec/fixtures/library/buttons.scss
================================================
@import "setup";
.all-buttons {
content: $all-buttons;
}
.all-buttons-active {
content: $all-buttons-active;
}
.all-buttons-focus {
content: $all-buttons-focus;
}
.all-buttons-hover {
content: $all-buttons-hover;
}
================================================
FILE: spec/fixtures/library/clearfix.scss
================================================
@import "setup";
.clearfix {
@include clearfix;
}
================================================
FILE: spec/fixtures/library/contrast-switch.scss
================================================
@import "setup";
.contrast-switch-light-base {
color: contrast-switch(#bae6e6);
}
.contrast-switch-dark-base {
color: contrast-switch(#2d72d9, #222, #eee);
}
================================================
FILE: spec/fixtures/library/ellipsis.scss
================================================
@import "setup";
.ellipsis {
@include ellipsis;
}
================================================
FILE: spec/fixtures/library/font-face-1.scss
================================================
@import "setup";
@include font-face(
"source-sans-pro",
"/fonts/source-sans-pro/source-sans-pro-regular"
);
================================================
FILE: spec/fixtures/library/font-face-2.scss
================================================
@import "setup";
@include font-face(
"calibre",
"fonts/calibre"
) {
font-style: normal;
font-weight: 600;
unicode-range: U+26;
}
================================================
FILE: spec/fixtures/library/font-face-3.scss
================================================
@import "setup";
@include font-face(
"pitch",
"/fonts/pitch",
"woff2",
$asset-pipeline: true
);
================================================
FILE: spec/fixtures/library/font-stacks.scss
================================================
@import "setup";
.helvetica {
content: $font-stack-helvetica;
}
.lucida-grande {
content: $font-stack-lucida-grande;
}
.verdana {
content: $font-stack-verdana;
}
.garamond {
content: $font-stack-garamond;
}
.georgia {
content: $font-stack-georgia;
}
.hoefler-text {
content: $font-stack-hoefler-text;
}
.consolas {
content: $font-stack-consolas;
}
.courier-new {
content: $font-stack-courier-new;
}
.monaco {
content: $font-stack-monaco;
}
.system {
content: $font-stack-system;
}
================================================
FILE: spec/fixtures/library/hide-text.scss
================================================
@import "setup";
.hide-text {
@include hide-text;
}
================================================
FILE: spec/fixtures/library/hide-visually.scss
================================================
@import "setup";
.hide-visually {
@include hide-visually;
}
.hide-visually--unhide {
@include hide-visually("unhide");
}
================================================
FILE: spec/fixtures/library/margin.scss
================================================
@import "setup";
.margin-all {
@include margin(1px);
}
.margin-alternate {
@include margin(2px 3px);
}
.margin-implied-left {
@include margin(4px 5px 6px);
}
.margin-explicit {
@include margin(7px 8px 9px 10px);
}
.margin-false-third {
@include margin(11px 12px null 13px);
}
================================================
FILE: spec/fixtures/library/modular-scale.scss
================================================
@import "setup";
.one {
&-base-two {
font-size: modular-scale(1, $value: 2em);
}
&-base-three {
font-size: modular-scale(1, $value: 3em);
}
&-double-value {
font-size: modular-scale(1, $value: 1em 2em);
}
&-golden-ratio {
font-size: modular-scale(1, $ratio: $golden);
}
}
.two {
&-base-one {
font-size: modular-scale(2, $value: 1em);
}
&-double-value {
font-size: modular-scale(2, $value: 2em);
}
}
================================================
FILE: spec/fixtures/library/overflow-wrap.scss
================================================
@import "setup";
.overflow-wrap {
@include overflow-wrap;
}
.overflow-wrap-normal {
@include overflow-wrap(normal);
}
================================================
FILE: spec/fixtures/library/padding.scss
================================================
@import "setup";
.padding-all {
@include padding(1px);
}
.padding-alternate {
@include padding(2px 3px);
}
.padding-implied-left {
@include padding(4px 5px 6px);
}
.padding-explicit {
@include padding(7px 8px 9px 10px);
}
.padding-false-third {
@include padding(11px 12px null 13px);
}
================================================
FILE: spec/fixtures/library/position.scss
================================================
@import "setup";
.position-all {
@include position(fixed, 1em);
}
.position-alternate {
@include position(absolute, 2px 3px);
}
.position-implied-left {
@include position(relative, 4px 5px 6px);
}
.position-explicit {
@include position(fixed, 7px 8px 9px 10px);
}
.position-false-third {
@include position(static, 11px null null 13px);
}
================================================
FILE: spec/fixtures/library/prefixer.scss
================================================
@import "setup";
.prefix {
@include prefixer(appearance, none);
}
.prefix--webkit {
@include prefixer(appearance, none, ("webkit"));
}
.prefix--moz-ms {
@include prefixer(appearance, none, ("moz", "ms"));
}
================================================
FILE: spec/fixtures/library/shade.scss
================================================
@import "setup";
.shade-white {
color: shade(#fff, 75%);
}
.shade-black {
color: shade(#000, 50%);
}
.shade-red {
color: shade(#f00, 25%);
}
.shade-gray {
color: shade(#222, 33%);
}
================================================
FILE: spec/fixtures/library/size.scss
================================================
@import "setup";
.size-implicit {
@include size(10px);
}
.size-both {
@include size(1em, 2em);
}
.size-auto {
@include size(100px, auto);
}
================================================
FILE: spec/fixtures/library/strip-unit.scss
================================================
@import "setup";
.px {
width: strip-unit(10px);
}
.em {
width: strip-unit(2em);
}
.rem {
width: strip-unit(1.5rem);
}
.percent {
width: strip-unit(20%);
}
================================================
FILE: spec/fixtures/library/text-inputs.scss
================================================
@import "setup";
.all-text-inputs {
content: $all-text-inputs;
}
.all-text-inputs-active {
content: $all-text-inputs-active;
}
.all-text-inputs-focus {
content: $all-text-inputs-focus;
}
.all-text-inputs-hover {
content: $all-text-inputs-hover;
}
.all-text-inputs-invalid {
content: $all-text-inputs-invalid;
}
================================================
FILE: spec/fixtures/library/tint.scss
================================================
@import "setup";
.tint-white {
color: tint(#fff, 75%);
}
.tint-black {
color: tint(#000, 50%);
}
.tint-red {
color: tint(#f00, 25%);
}
.tint-gray {
color: tint(#aaa, 33%);
}
================================================
FILE: spec/fixtures/library/triangle.scss
================================================
@import "setup";
.triangle--up {
@include triangle("up", 2rem, 1rem, #b25c9c);
}
.triangle--right {
@include triangle("right", 5px, 12px, #aaa);
}
================================================
FILE: spec/fixtures/utilities/assign-inputs.scss
================================================
@import "setup";
#{_assign-inputs($_text-inputs-list)} {
color: #f00;
}
#{_assign-inputs($_text-inputs-list, active)} {
color: #0f0;
}
#{_assign-inputs($_text-inputs-list)},
select {
color: #00f;
}
[type="file"],
#{_assign-inputs($_text-inputs-list)} {
color: #f0f;
}
================================================
FILE: spec/fixtures/utilities/compact-shorthand.scss
================================================
@import "setup";
.four-values-a {
padding: _compact-shorthand(10px 20px 30px 40px);
}
.four-values-b {
padding: _compact-shorthand(5px 10px 5px 20px);
}
.two-values {
padding: _compact-shorthand(50px 100px 50px 100px);
}
.one-value {
padding: _compact-shorthand(10px 10px 10px 10px);
}
.null-value {
padding: _compact-shorthand(10px null 20px);
}
================================================
FILE: spec/fixtures/utilities/contrast-ratio.scss
================================================
@import "setup";
.contrast-ratio-black {
content: _contrast-ratio(#fff, #000);
}
.contrast-ratio-blue {
content: _contrast-ratio(#fff, #00f);
}
================================================
FILE: spec/fixtures/utilities/directional-property.scss
================================================
@import "setup";
.border-all {
@include _directional-property(border, width, 2px 5px 8px 12px);
}
.border-top {
@include _directional-property(border, top, 10px);
}
.border-color {
@include _directional-property(border, color, #fff #000);
}
.margin-null {
@include _directional-property(margin, null, 20px null 10px);
}
================================================
FILE: spec/fixtures/utilities/fetch-bourbon-setting.scss
================================================
@import "setup";
$bourbon: (
"global-font-file-formats": ("woff2", "woff"),
"rails-asset-pipeline": true,
);
.test-1 {
content: _fetch-bourbon-setting("modular-scale-base");
}
.test-2 {
content: _fetch-bourbon-setting("rails-asset-pipeline");
}
@include font-face("source-sans-pro", "source-sans-pro-regular");
================================================
FILE: spec/fixtures/utilities/font-source-declaration.scss
================================================
@import "setup";
$file-formats: ("woff2", "woff");
.has-pipeline {
src: _font-source-declaration("a", "b", true, $file-formats);
}
.no-pipeline {
src: _font-source-declaration("a", "b", false, $file-formats);
}
================================================
FILE: spec/fixtures/utilities/gamma.scss
================================================
@import "setup";
.gamma {
content: _gamma(100 / 255);
}
.gamma-full {
content: _gamma(255 / 255);
}
================================================
FILE: spec/fixtures/utilities/lightness.scss
================================================
@import "setup";
.lightness-black {
content: _lightness(#000);
}
.lightness-white {
content: _lightness(#fff);
}
.lightness-gray {
content: _lightness(mix(#000, #fff, 50%));
}
================================================
FILE: spec/fixtures/utilities/unpack.scss
================================================
@import "setup";
.single {
padding: _unpack-shorthand(10px);
}
.double {
padding: _unpack-shorthand(1em 2em);
}
.triple {
padding: _unpack-shorthand(10px 20px 0);
}
.quadruple {
padding: _unpack-shorthand(0 calc(1em + 10px) 20px 50px);
}
================================================
FILE: spec/fixtures/validators/contains.scss
================================================
@import "setup";
$single: "apple";
$multiple: "pineapple", "banana", "cumquat";
@mixin color-contains($list, $values) {
@if _contains($list, $values) {
color: #fff;
} @else {
color: #000;
}
}
.single {
@include color-contains($single, "apple");
}
.single-missing {
@include color-contains($single, "pear");
}
.multiple {
@include color-contains($multiple, "banana");
}
.multiple-missing {
@include color-contains($multiple, "strawberry");
}
================================================
FILE: spec/fixtures/validators/is-length.scss
================================================
@import "setup";
@mixin color-length($value) {
@if _is-length($value) {
color: #fff;
}
}
.integer {
@include color-length(1);
}
.pixels {
@include color-length(10px);
}
.ems {
@include color-length(10em);
}
.percent {
@include color-length(10%);
}
.calc {
@include color-length(calc(2em - 5px));
}
.env {
@include color-length(env(safe-area-inset-top, 0));
}
.var {
@include color-length(var(--a-custom-property));
}
.string {
@include color-length("stringy");
}
.null {
@include color-length(null);
}
================================================
FILE: spec/fixtures/validators/is-number.scss
================================================
@import "setup";
@mixin line-height($number) {
@if _is-number($number) {
line-height: $number;
}
}
.integer {
@include line-height(1);
}
.px {
@include line-height(2px);
}
.em {
@include line-height(3em);
}
.rem {
@include line-height(4rem);
}
.percent {
@include line-height(5%);
}
.string {
@include line-height("stringy");
}
================================================
FILE: spec/fixtures/validators/is-size.scss
================================================
@import "setup";
@mixin size-margin($size) {
@if _is-size($size) {
margin-top: $size;
}
}
.integer {
@include size-margin(1);
}
.px {
@include size-margin(2px);
}
.em {
@include size-margin(3em);
}
.rem {
@include size-margin(4rem);
}
.percent {
@include size-margin(5%);
}
.string {
@include size-margin("stringy");
}
================================================
FILE: spec/spec_helper.rb
================================================
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require "rspec"
require "bourbon"
require "aruba/api"
require "css_parser"
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
RSpec.configure do |config|
config.include SassSupport
config.include CssParser
config.include ParserSupport
config.include Aruba::Api
config.before(:all) do
generate_css
end
config.after(:all) do
clean_up
end
end
================================================
FILE: spec/support/matchers/have_rule.rb
================================================
RSpec::Matchers.define :have_rule do |expected|
match do |selector|
@rules = rules_from_selector(selector)
@rules.include? expected
end
failure_message do |selector|
if @rules.empty?
%{no CSS for selector #{selector} were found}
else
rules = @rules.join("; ")
%{Expected selector #{selector} to have CSS rule "#{expected}".
Had "#{rules}".}
end
end
def rules_from_selector(selector)
rulesets = ParserSupport.parser.find_by_selector(selector)
if rulesets.empty?
[]
else
rules(rulesets)
end
end
def rules(rulesets)
rules = []
rulesets.map do |ruleset|
ruleset.split(";").each do |rule|
rules << rule.strip
end
end
rules
end
end
================================================
FILE: spec/support/matchers/have_ruleset.rb
================================================
RSpec::Matchers.define :have_ruleset do |expected|
match do |selector|
@ruleset = rules_from_selector(selector)
@ruleset.join("; ") == expected
end
failure_message do |selector|
if @ruleset.empty?
%{no CSS for selector #{selector} were found}
else
ruleset = @ruleset.join("; ")
%{Expected selector #{selector} to have CSS rule "#{expected}".
Had "#{ruleset}".}
end
end
def rules_from_selector(selector)
ParserSupport.parser.find_by_selector(selector)
end
end
================================================
FILE: spec/support/matchers/have_value.rb
================================================
RSpec::Matchers.define :have_value do |expected|
match do |variable|
selector_class = variable.sub("$", ".")
@value_attribute = ParserSupport.parser.find_by_selector(selector_class)[0]
unless @value_attribute.nil?
actual_value = @value_attribute.split(":")[1].strip.sub(";", "")
actual_value == expected
end
end
failure_message do |variable_name|
value_attribute = @value_attribute.to_s
%{Expected variable #{variable_name} to have value "#{expected}".
Had "#{value_attribute}".}
end
end
================================================
FILE: spec/support/parser_support.rb
================================================
module ParserSupport
def self.parser
@parser ||= CssParser::Parser.new
end
def self.parse_file(identifier)
parser.load_file!("tmp/#{identifier}.css")
end
def self.show_contents(identifier)
css_file_contents = File.open("tmp/#{identifier}.css").read
css_file_contents.each_line do |line|
puts line
end
end
end
================================================
FILE: spec/support/sass_support.rb
================================================
module SassSupport
def generate_css
FileUtils.mkdir("tmp")
`sass -I . spec/fixtures:tmp --update --precision=5 --sourcemap=none`
end
def clean_up
FileUtils.rm_rf("tmp")
end
end
gitextract_vs77nx0t/
├── .circleci/
│ └── config.yml
├── .github/
│ ├── ISSUE_TEMPLATE.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── dynamic-readme.yml
│ └── dynamic-security.yml
├── .gitignore
├── .hound.yml
├── .npmignore
├── .stylelintrc.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Gemfile
├── LICENSE.md
├── README.md
├── RELEASING.md
├── Rakefile
├── SECURITY.md
├── bin/
│ └── bourbon
├── bourbon.gemspec
├── core/
│ ├── _bourbon.scss
│ └── bourbon/
│ ├── helpers/
│ │ ├── _buttons-list.scss
│ │ ├── _scales.scss
│ │ └── _text-inputs-list.scss
│ ├── library/
│ │ ├── _border-color.scss
│ │ ├── _border-radius.scss
│ │ ├── _border-style.scss
│ │ ├── _border-width.scss
│ │ ├── _buttons.scss
│ │ ├── _clearfix.scss
│ │ ├── _contrast-switch.scss
│ │ ├── _ellipsis.scss
│ │ ├── _font-face.scss
│ │ ├── _font-stacks.scss
│ │ ├── _hide-text.scss
│ │ ├── _hide-visually.scss
│ │ ├── _margin.scss
│ │ ├── _modular-scale.scss
│ │ ├── _overflow-wrap.scss
│ │ ├── _padding.scss
│ │ ├── _position.scss
│ │ ├── _prefixer.scss
│ │ ├── _shade.scss
│ │ ├── _size.scss
│ │ ├── _strip-unit.scss
│ │ ├── _text-inputs.scss
│ │ ├── _timing-functions.scss
│ │ ├── _tint.scss
│ │ ├── _triangle.scss
│ │ └── _value-prefixer.scss
│ ├── settings/
│ │ └── _settings.scss
│ ├── utilities/
│ │ ├── _assign-inputs.scss
│ │ ├── _compact-shorthand.scss
│ │ ├── _contrast-ratio.scss
│ │ ├── _directional-property.scss
│ │ ├── _fetch-bourbon-setting.scss
│ │ ├── _font-source-declaration.scss
│ │ ├── _gamma.scss
│ │ ├── _lightness.scss
│ │ └── _unpack-shorthand.scss
│ └── validators/
│ ├── _contains-falsy.scss
│ ├── _contains.scss
│ ├── _is-color.scss
│ ├── _is-length.scss
│ ├── _is-number.scss
│ └── _is-size.scss
├── eyeglass-exports.js
├── features/
│ ├── install.feature
│ ├── step_definitions/
│ │ └── bourbon_steps.rb
│ ├── support/
│ │ ├── bourbon_support.rb
│ │ └── env.rb
│ ├── update.feature
│ └── version.feature
├── index.js
├── lib/
│ ├── bourbon/
│ │ ├── generator.rb
│ │ └── version.rb
│ └── bourbon.rb
├── package.json
└── spec/
├── bourbon/
│ ├── library/
│ │ ├── border_color_spec.rb
│ │ ├── border_radius_spec.rb
│ │ ├── border_style_spec.rb
│ │ ├── border_width_spec.rb
│ │ ├── buttons_spec.rb
│ │ ├── clearfix_spec.rb
│ │ ├── contrast_switch_spec.rb
│ │ ├── ellipsis_spec.rb
│ │ ├── font_face_spec_1.rb
│ │ ├── font_face_spec_2.rb
│ │ ├── font_face_spec_3.rb
│ │ ├── font_stacks_spec.rb
│ │ ├── hide_text_spec.rb
│ │ ├── hide_visually_spec.rb
│ │ ├── margin_spec.rb
│ │ ├── modular_scale_spec.rb
│ │ ├── overflow_wrap_spec.rb
│ │ ├── padding_spec.rb
│ │ ├── position_spec.rb
│ │ ├── prefixer_spec.rb
│ │ ├── shade_spec.rb
│ │ ├── size_spec.rb
│ │ ├── strip_unit_spec.rb
│ │ ├── text_inputs_spec.rb
│ │ ├── tint_spec.rb
│ │ └── triangle_spec.rb
│ ├── utilities/
│ │ ├── assign_inputs_spec.rb
│ │ ├── compact_shorthand_spec.rb
│ │ ├── contrast_ratio_spec.rb
│ │ ├── directional_property_spec.rb
│ │ ├── fetch_bourbon_setting_spec.rb
│ │ ├── font_source_declaration_spec.rb
│ │ ├── gamma_spec.rb
│ │ ├── lightness_spec.rb
│ │ └── unpack_spec.rb
│ └── validators/
│ ├── contains_spec.rb
│ ├── is_length_spec.rb
│ ├── is_number_spec.rb
│ └── is_size_spec.rb
├── fixtures/
│ ├── _setup.scss
│ ├── library/
│ │ ├── border-color.scss
│ │ ├── border-radius.scss
│ │ ├── border-style.scss
│ │ ├── border-width.scss
│ │ ├── buttons.scss
│ │ ├── clearfix.scss
│ │ ├── contrast-switch.scss
│ │ ├── ellipsis.scss
│ │ ├── font-face-1.scss
│ │ ├── font-face-2.scss
│ │ ├── font-face-3.scss
│ │ ├── font-stacks.scss
│ │ ├── hide-text.scss
│ │ ├── hide-visually.scss
│ │ ├── margin.scss
│ │ ├── modular-scale.scss
│ │ ├── overflow-wrap.scss
│ │ ├── padding.scss
│ │ ├── position.scss
│ │ ├── prefixer.scss
│ │ ├── shade.scss
│ │ ├── size.scss
│ │ ├── strip-unit.scss
│ │ ├── text-inputs.scss
│ │ ├── tint.scss
│ │ └── triangle.scss
│ ├── utilities/
│ │ ├── assign-inputs.scss
│ │ ├── compact-shorthand.scss
│ │ ├── contrast-ratio.scss
│ │ ├── directional-property.scss
│ │ ├── fetch-bourbon-setting.scss
│ │ ├── font-source-declaration.scss
│ │ ├── gamma.scss
│ │ ├── lightness.scss
│ │ └── unpack.scss
│ └── validators/
│ ├── contains.scss
│ ├── is-length.scss
│ ├── is-number.scss
│ └── is-size.scss
├── spec_helper.rb
└── support/
├── matchers/
│ ├── have_rule.rb
│ ├── have_ruleset.rb
│ └── have_value.rb
├── parser_support.rb
└── sass_support.rb
SYMBOL INDEX (30 symbols across 8 files)
FILE: features/support/bourbon_support.rb
type BourbonSupport (line 1) | module BourbonSupport
function install_bourbon (line 2) | def install_bourbon(path = nil)
function bourbon_path (line 10) | def bourbon_path(prefix, path)
FILE: lib/bourbon.rb
type Bourbon (line 3) | module Bourbon
class Engine (line 5) | class Engine < ::Rails::Engine
FILE: lib/bourbon/generator.rb
type Bourbon (line 6) | module Bourbon
class Generator (line 7) | class Generator < Thor
method install (line 12) | def install
method update (line 23) | def update
method version (line 34) | def version
method bourbon_files_already_exist? (line 40) | def bourbon_files_already_exist?
method install_path (line 44) | def install_path
method install_files (line 52) | def install_files
method remove_bourbon_directory (line 57) | def remove_bourbon_directory
method make_install_directory (line 61) | def make_install_directory
method copy_in_scss_files (line 65) | def copy_in_scss_files
method all_stylesheets (line 69) | def all_stylesheets
method stylesheets_directory (line 73) | def stylesheets_directory
method top_level_directory (line 77) | def top_level_directory
FILE: lib/bourbon/version.rb
type Bourbon (line 1) | module Bourbon
FILE: spec/support/matchers/have_rule.rb
function rules_from_selector (line 17) | def rules_from_selector(selector)
function rules (line 26) | def rules(rulesets)
FILE: spec/support/matchers/have_ruleset.rb
function rules_from_selector (line 17) | def rules_from_selector(selector)
FILE: spec/support/parser_support.rb
type ParserSupport (line 1) | module ParserSupport
function parser (line 2) | def self.parser
function parse_file (line 6) | def self.parse_file(identifier)
function show_contents (line 10) | def self.show_contents(identifier)
FILE: spec/support/sass_support.rb
type SassSupport (line 1) | module SassSupport
function generate_css (line 2) | def generate_css
function clean_up (line 7) | def clean_up
Condensed preview — 163 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (159K chars).
[
{
"path": ".circleci/config.yml",
"chars": 1155,
"preview": "version: 2.1\n\norbs:\n # orbs are basically bundles of pre-written build scripts that work for common cases\n # https://g"
},
{
"path": ".github/ISSUE_TEMPLATE.md",
"chars": 552,
"preview": "<!-- Feel free to remove any part of this issue template that is not relevant -->\n<!-- Providing context helps us come u"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 371,
"preview": "<!-- Feel free to remove any part of this pull request template that is not relevant -->\n\n## Description\n\n<!-- What do y"
},
{
"path": ".github/workflows/dynamic-readme.yml",
"chars": 325,
"preview": "name: update-templates\n\non: \n push:\n branches:\n - main\n workflow_dispatch:\n\njobs:\n update-templates:\n perm"
},
{
"path": ".github/workflows/dynamic-security.yml",
"chars": 355,
"preview": "name: update-security\n\non:\n push:\n paths:\n - SECURITY.md\n branches:\n - main\n workflow_dispatch:\n\njobs:"
},
{
"path": ".gitignore",
"chars": 70,
"preview": "*gem\n*swp\n.DS_store\n.sass-cache\n_site\nGemfile.lock\nnpm-debug.log\ntmp/\n"
},
{
"path": ".hound.yml",
"chars": 125,
"preview": "ruby:\n enabled: true\nscss:\n enabled: false\nstylelint:\n config_file: .stylelintrc.json\n enabled: true\n # version: 10"
},
{
"path": ".npmignore",
"chars": 217,
"preview": ".circleci/\n.github/\n.gitignore\n.hound.yml\n.ruby-version\n.sass-cache\n.stylelintrc.json\n_site\nbin/\nbourbon.gemspec\nCODE_OF"
},
{
"path": ".stylelintrc.json",
"chars": 48,
"preview": "{\n \"extends\": \"@thoughtbot/stylelint-config\"\n}\n"
},
{
"path": "CHANGELOG.md",
"chars": 14138,
"preview": "# Change Log\n\nAll notable changes to this project will be documented in this file. This\nproject adheres to [Semantic Ver"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 179,
"preview": "# Code of Conduct\n\nBy participating in this project, you agree to abide by the\n[thoughtbot code of conduct][tb-coc].\n\n[t"
},
{
"path": "CONTRIBUTING.md",
"chars": 3116,
"preview": "# Contributing\n\n## Governance\n\nWe, the maintainers of Bourbon, would like you to know what to expect when\ninteracting wi"
},
{
"path": "Gemfile",
"chars": 39,
"preview": "source \"https://rubygems.org\"\n\ngemspec\n"
},
{
"path": "LICENSE.md",
"chars": 1111,
"preview": "The MIT License (MIT)\n\nCopyright © 2011-2020 [thoughtbot, inc.](http://thoughtbot.com)\n\nPermission is hereby granted, fr"
},
{
"path": "README.md",
"chars": 5917,
"preview": "[<img src=\"https://images.thoughtbot.com/bourbon/bourbon-logo.svg\" width=\"200\" alt=\"Bourbon logo\">][Bourbon]\n\n[![Reviewe"
},
{
"path": "RELEASING.md",
"chars": 1123,
"preview": "# Releasing\n\n1. Update the version number in these places:\n\n - `lib/bourbon/version.rb`\n - `core/_bourbon.scss`\n "
},
{
"path": "Rakefile",
"chars": 207,
"preview": "require \"bundler\"\nrequire \"cucumber/rake/task\"\nrequire \"rspec/core/rake_task\"\n\nBundler::GemHelper.install_tasks\nCucumber"
},
{
"path": "SECURITY.md",
"chars": 661,
"preview": "<!-- START /templates/security.md -->\n# Security Policy\n\n## Supported Versions\n\nOnly the the latest version of this proj"
},
{
"path": "bin/bourbon",
"chars": 101,
"preview": "#!/usr/bin/env ruby\n\nrequire File.dirname(__FILE__) + \"/../lib/bourbon.rb\"\n\nBourbon::Generator.start\n"
},
{
"path": "bourbon.gemspec",
"chars": 1270,
"preview": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"bourbon/version\"\n\nGem::Specification.new do |s|\n s.add_developmen"
},
{
"path": "core/_bourbon.scss",
"chars": 1892,
"preview": "// Bourbon 7.3.0\n// https://www.bourbon.io/\n// Copyright 2011-2020 thoughtbot, inc.\n// MIT License\n\n@import \"bourbon/hel"
},
{
"path": "core/bourbon/helpers/_buttons-list.scss",
"chars": 198,
"preview": "@charset \"UTF-8\";\n\n/// A list of all HTML button elements.\n///\n/// @type list\n///\n/// @access private\n\n$_buttons-list: ("
},
{
"path": "core/bourbon/helpers/_scales.scss",
"chars": 515,
"preview": "@charset \"UTF-8\";\n\n////\n/// Pre-defined scales for use with the `modular-scale` function.\n///\n/// @type number (unitless"
},
{
"path": "core/bourbon/helpers/_text-inputs-list.scss",
"chars": 458,
"preview": "@charset \"UTF-8\";\n\n/// A list of all _text-based_ HTML inputs.\n///\n/// @type list\n///\n/// @access private\n\n$_text-inputs"
},
{
"path": "core/bourbon/library/_border-color.scss",
"chars": 679,
"preview": "@charset \"UTF-8\";\n\n/// Provides a concise, one-line method for setting `border-color` on specific\n/// edges of a box. Us"
},
{
"path": "core/bourbon/library/_border-radius.scss",
"chars": 1998,
"preview": "@charset \"UTF-8\";\n\n/// Provides a concise, one-line method for setting `border-radius` on both the\n/// top-left and top-"
},
{
"path": "core/bourbon/library/_border-style.scss",
"chars": 637,
"preview": "@charset \"UTF-8\";\n\n/// Provides a concise, one-line method for setting `border-style` on specific\n/// edges of a box. Us"
},
{
"path": "core/bourbon/library/_border-width.scss",
"chars": 629,
"preview": "@charset \"UTF-8\";\n\n/// Provides a concise, one-line method for setting `border-width` on specific\n/// edges of a box. Us"
},
{
"path": "core/bourbon/library/_buttons.scss",
"chars": 2032,
"preview": "@charset \"UTF-8\";\n\n////\n/// @type list\n///\n/// @require {function} _assign-inputs\n///\n/// @require {variable} $_buttons-"
},
{
"path": "core/bourbon/library/_clearfix.scss",
"chars": 413,
"preview": "@charset \"UTF-8\";\n\n/// Provides an easy way to include a clearfix for containing floats.\n///\n/// @link https://goo.gl/yP"
},
{
"path": "core/bourbon/library/_contrast-switch.scss",
"chars": 2578,
"preview": "@charset \"UTF-8\";\n\n/// Switches between two colors based on the contrast to another color. It’s\n/// like a [ternary oper"
},
{
"path": "core/bourbon/library/_ellipsis.scss",
"chars": 783,
"preview": "@charset \"UTF-8\";\n\n/// Truncates text and adds an ellipsis to represent overflow.\n///\n/// @argument {number} $width [100"
},
{
"path": "core/bourbon/library/_font-face.scss",
"chars": 2072,
"preview": "@charset \"UTF-8\";\n\n/// Generates an `@font-face` declaration. You can choose the specific file\n/// formats you need to o"
},
{
"path": "core/bourbon/library/_font-stacks.scss",
"chars": 4725,
"preview": "@charset \"UTF-8\";\n\n/// A variable that outputs a Helvetica font stack.\n///\n/// @link https://goo.gl/uSJvZe\n///\n/// @type"
},
{
"path": "core/bourbon/library/_hide-text.scss",
"chars": 477,
"preview": "@charset \"UTF-8\";\n\n/// Hides the text in an element, commonly used to show an image instead. Some\n/// elements will need"
},
{
"path": "core/bourbon/library/_hide-visually.scss",
"chars": 1741,
"preview": "@charset \"UTF-8\";\n\n/// Hides an element visually while still allowing the content to be accessible\n/// to assistive tech"
},
{
"path": "core/bourbon/library/_margin.scss",
"chars": 818,
"preview": "@charset \"UTF-8\";\n\n/// Provides a concise, one-line method for setting `margin` on specific edges\n/// of a box. Use a `n"
},
{
"path": "core/bourbon/library/_modular-scale.scss",
"chars": 2864,
"preview": "@charset \"UTF-8\";\n\n/// Increments up or down a defined scale and returns an adjusted value. This\n/// helps establish con"
},
{
"path": "core/bourbon/library/_overflow-wrap.scss",
"chars": 645,
"preview": "@charset \"UTF-8\";\n\n/// Outputs the `overflow-wrap` property and its legacy name `word-wrap` to\n/// support browsers that"
},
{
"path": "core/bourbon/library/_padding.scss",
"chars": 792,
"preview": "@charset \"UTF-8\";\n\n/// Provides a concise method for targeting `padding` on specific sides of a\n/// box. Use a `null` va"
},
{
"path": "core/bourbon/library/_position.scss",
"chars": 1315,
"preview": "@charset \"UTF-8\";\n\n/// Provides a concise, one-line method for setting an element’s positioning\n/// properties: `positio"
},
{
"path": "core/bourbon/library/_prefixer.scss",
"chars": 686,
"preview": "@charset \"UTF-8\";\n\n/// Generates vendor prefixes.\n///\n/// @argument {string} $property\n/// Property to prefix.\n///\n///"
},
{
"path": "core/bourbon/library/_shade.scss",
"chars": 613,
"preview": "@charset \"UTF-8\";\n\n/// Mixes a color with black.\n///\n/// @argument {color} $color\n///\n/// @argument {number (percentage)"
},
{
"path": "core/bourbon/library/_size.scss",
"chars": 994,
"preview": "@charset \"UTF-8\";\n\n/// Sets the `width` and `height` of the element in one statement.\n///\n/// @argument {number (with un"
},
{
"path": "core/bourbon/library/_strip-unit.scss",
"chars": 297,
"preview": "@charset \"UTF-8\";\n\n/// Strips the unit from a number.\n///\n/// @argument {number} $value\n///\n/// @return {number (unitles"
},
{
"path": "core/bourbon/library/_text-inputs.scss",
"chars": 4337,
"preview": "@charset \"UTF-8\";\n\n////\n/// @type list\n///\n/// @require {function} _assign-inputs\n///\n/// @require {variable} $_text-inp"
},
{
"path": "core/bourbon/library/_timing-functions.scss",
"chars": 1430,
"preview": "@charset \"UTF-8\";\n\n////\n/// CSS cubic-bezier timing functions.\n///\n/// @link https://goo.gl/p8u6SK\n///\n/// @type string\n"
},
{
"path": "core/bourbon/library/_tint.scss",
"chars": 610,
"preview": "@charset \"UTF-8\";\n\n/// Mixes a color with white.\n///\n/// @argument {color} $color\n///\n/// @argument {number (percentage)"
},
{
"path": "core/bourbon/library/_triangle.scss",
"chars": 2536,
"preview": "@charset \"UTF-8\";\n\n/// Generates a triangle pointing in a specified direction.\n///\n/// @argument {string} $direction\n///"
},
{
"path": "core/bourbon/library/_value-prefixer.scss",
"chars": 698,
"preview": "@charset \"UTF-8\";\n\n/// Generates vendor prefixes for values.\n///\n/// @argument {string} $property\n/// Property to use."
},
{
"path": "core/bourbon/settings/_settings.scss",
"chars": 2600,
"preview": "@charset \"UTF-8\";\n\n/// Default global Bourbon settings. Values in this map are overwritten by any\n/// values set in the "
},
{
"path": "core/bourbon/utilities/_assign-inputs.scss",
"chars": 560,
"preview": "@charset \"UTF-8\";\n\n/// Append pseudo-classes to a selector(s).\n///\n/// @argument {list | string} $inputs\n/// A selecto"
},
{
"path": "core/bourbon/utilities/_compact-shorthand.scss",
"chars": 909,
"preview": "@charset \"UTF-8\";\n\n/// Transforms shorthand to its shortest possible form.\n///\n/// @argument {list} $values\n/// List o"
},
{
"path": "core/bourbon/utilities/_contrast-ratio.scss",
"chars": 740,
"preview": "@charset \"UTF-8\";\n\n/// Programatically determines the contrast ratio between two colors.\n///\n/// Note that the alpha cha"
},
{
"path": "core/bourbon/utilities/_directional-property.scss",
"chars": 1969,
"preview": "@charset \"UTF-8\";\n\n/// Builds directional properties by parsing CSS shorthand values. For example,\n/// a value of `10px "
},
{
"path": "core/bourbon/utilities/_fetch-bourbon-setting.scss",
"chars": 359,
"preview": "@charset \"UTF-8\";\n\n/// Return a Bourbon setting.\n///\n/// @argument {string} $setting\n///\n/// @return {boolean | color | "
},
{
"path": "core/bourbon/utilities/_font-source-declaration.scss",
"chars": 1168,
"preview": "@charset \"UTF-8\";\n\n/// Builds the `src` list for an `@font-face` declaration.\n///\n/// @link https://goo.gl/Ru1bKP\n///\n//"
},
{
"path": "core/bourbon/utilities/_gamma.scss",
"chars": 527,
"preview": "@charset \"UTF-8\";\n\n/// Performs gamma correction on a single color channel.\n///\n/// Note that the calculation is approxi"
},
{
"path": "core/bourbon/utilities/_lightness.scss",
"chars": 627,
"preview": "@charset \"UTF-8\";\n\n/// Programatically determines the lightness of a color.\n///\n/// @argument {color (hex)} $hex-color\n/"
},
{
"path": "core/bourbon/utilities/_unpack-shorthand.scss",
"chars": 789,
"preview": "@charset \"UTF-8\";\n\n/// Transforms shorthand that can range from 1-to-4 values to be 4 values.\n///\n/// @argument {list} $"
},
{
"path": "core/bourbon/validators/_contains-falsy.scss",
"chars": 314,
"preview": "@charset \"UTF-8\";\n\n/// Checks if a list does not contain any values.\n///\n/// @argument {list} $list\n/// The list to ch"
},
{
"path": "core/bourbon/validators/_contains.scss",
"chars": 439,
"preview": "@charset \"UTF-8\";\n\n/// Checks if a list contains a value(s).\n///\n/// @argument {list} $list\n/// The list to check agai"
},
{
"path": "core/bourbon/validators/_is-color.scss",
"chars": 238,
"preview": "@charset \"UTF-8\";\n\n/// Checks for a valid CSS color.\n///\n/// @argument {string} $color\n///\n/// @return {boolean}\n///\n///"
},
{
"path": "core/bourbon/validators/_is-length.scss",
"chars": 476,
"preview": "@charset \"UTF-8\";\n\n/// Checks for a valid CSS length.\n///\n/// @argument {string} $value\n///\n/// @return {boolean}\n///\n//"
},
{
"path": "core/bourbon/validators/_is-number.scss",
"chars": 296,
"preview": "@charset \"UTF-8\";\n\n/// Checks for a valid number.\n///\n/// @argument {number} $value\n///\n/// @require {function} _contain"
},
{
"path": "core/bourbon/validators/_is-size.scss",
"chars": 350,
"preview": "@charset \"UTF-8\";\n\n/// Checks for a valid CSS size.\n///\n/// @argument {string} $value\n///\n/// @return {boolean}\n///\n/// "
},
{
"path": "eyeglass-exports.js",
"chars": 135,
"preview": "var bourbon = require(\"./index\");\n\nmodule.exports = function(eyeglass, sass) {\n return {\n sassDir: bourbon.includePa"
},
{
"path": "features/install.feature",
"chars": 1427,
"preview": "Feature: Install bourbon files\n\n Scenario: Bourbon generates a new bourbon installation\n When I run `bundle exec bou"
},
{
"path": "features/step_definitions/bourbon_steps.rb",
"chars": 986,
"preview": "Given /^bourbon is already installed$/ do\n install_bourbon\nend\n\nGiven /^I install bourbon to \"([^\"]*)\"$/ do |path|\nend\n"
},
{
"path": "features/support/bourbon_support.rb",
"chars": 376,
"preview": "module BourbonSupport\n def install_bourbon(path = nil)\n if path\n run_simple(\"bundle exec bourbon install --path"
},
{
"path": "features/support/env.rb",
"chars": 25,
"preview": "require \"aruba/cucumber\"\n"
},
{
"path": "features/update.feature",
"chars": 1137,
"preview": "Feature: Update bourbon files\n\n Scenario: Updating updates an existing bourbon install\n Given bourbon is already ins"
},
{
"path": "features/version.feature",
"chars": 176,
"preview": "Feature: Show version\n Scenario: Viewing version\n When I successfully run `bundle exec bourbon --version`\n Then t"
},
{
"path": "index.js",
"chars": 106,
"preview": "var path = require(\"path\");\n\nmodule.exports = {\n includePaths: [\n path.join(__dirname, \"core\")\n ]\n};\n"
},
{
"path": "lib/bourbon/generator.rb",
"chars": 1808,
"preview": "require \"bourbon/version\"\nrequire \"fileutils\"\nrequire \"thor\"\nrequire \"pathname\"\n\nmodule Bourbon\n class Generator < Thor"
},
{
"path": "lib/bourbon/version.rb",
"chars": 46,
"preview": "module Bourbon\n VERSION = \"7.3.0\".freeze\nend\n"
},
{
"path": "lib/bourbon.rb",
"chars": 412,
"preview": "require \"bourbon/generator\"\n\nmodule Bourbon\n if defined?(Rails) && defined?(Rails::Engine)\n class Engine < ::Rails::"
},
{
"path": "package.json",
"chars": 920,
"preview": "{\n \"author\": {\n \"name\": \"thoughtbot\",\n \"url\": \"http://thoughtbot.com\"\n },\n \"bugs\": {\n \"url\": \"https://github"
},
{
"path": "spec/bourbon/library/border_color_spec.rb",
"chars": 1346,
"preview": "require \"spec_helper\"\n\ndescribe \"border-color\" do\n before(:all) do\n ParserSupport.parse_file(\"library/border-color\")"
},
{
"path": "spec/bourbon/library/border_radius_spec.rb",
"chars": 848,
"preview": "require \"spec_helper\"\n\ndescribe \"border-radius\" do\n before(:all) do\n ParserSupport.parse_file(\"library/border-radius"
},
{
"path": "spec/bourbon/library/border_style_spec.rb",
"chars": 1364,
"preview": "require \"spec_helper\"\n\ndescribe \"border-style\" do\n before(:all) do\n ParserSupport.parse_file(\"library/border-style\")"
},
{
"path": "spec/bourbon/library/border_width_spec.rb",
"chars": 1337,
"preview": "require \"spec_helper\"\n\ndescribe \"border-width\" do\n before(:all) do\n ParserSupport.parse_file(\"library/border-width\")"
},
{
"path": "spec/bourbon/library/buttons_spec.rb",
"chars": 1240,
"preview": "require \"spec_helper\"\n\ndescribe \"buttons\" do\n before(:all) do\n ParserSupport.parse_file(\"library/buttons\")\n\n @but"
},
{
"path": "spec/bourbon/library/clearfix_spec.rb",
"chars": 378,
"preview": "require \"spec_helper\"\n\ndescribe \"clearfix\" do\n before(:all) do\n ParserSupport.parse_file(\"library/clearfix\")\n end\n\n"
},
{
"path": "spec/bourbon/library/contrast_switch_spec.rb",
"chars": 518,
"preview": "require \"spec_helper\"\n\ndescribe \"contrast-switch\" do\n before(:all) do\n ParserSupport.parse_file(\"library/contrast-sw"
},
{
"path": "spec/bourbon/library/ellipsis_spec.rb",
"chars": 495,
"preview": "require \"spec_helper\"\n\ndescribe \"ellipsis\" do\n before(:all) do\n ParserSupport.parse_file(\"library/ellipsis\")\n end\n\n"
},
{
"path": "spec/bourbon/library/font_face_spec_1.rb",
"chars": 488,
"preview": "require \"spec_helper\"\n\ndescribe \"font-face\" do\n before(:all) do\n ParserSupport.parse_file(\"library/font-face-1\")\n e"
},
{
"path": "spec/bourbon/library/font_face_spec_2.rb",
"chars": 591,
"preview": "require \"spec_helper\"\n\ndescribe \"font-face\" do\n before(:all) do\n ParserSupport.parse_file(\"library/font-face-5\")\n e"
},
{
"path": "spec/bourbon/library/font_face_spec_3.rb",
"chars": 373,
"preview": "require \"spec_helper\"\n\ndescribe \"font-face\" do\n before(:all) do\n ParserSupport.parse_file(\"library/font-face-3\")\n e"
},
{
"path": "spec/bourbon/library/font_stacks_spec.rb",
"chars": 1919,
"preview": "require \"spec_helper\"\n\ndescribe \"font-stacks\" do\n before(:all) do\n ParserSupport.parse_file(\"library/font-stacks\")\n "
},
{
"path": "spec/bourbon/library/hide_text_spec.rb",
"chars": 371,
"preview": "require \"spec_helper\"\n\ndescribe \"hide-text\" do\n before(:all) do\n ParserSupport.parse_file(\"library/hide-text\")\n end"
},
{
"path": "spec/bourbon/library/hide_visually_spec.rb",
"chars": 1082,
"preview": "require \"spec_helper\"\n\ndescribe \"hide-visually\" do\n before(:all) do\n ParserSupport.parse_file(\"library/hide-visually"
},
{
"path": "spec/bourbon/library/margin_spec.rb",
"chars": 1237,
"preview": "require \"spec_helper\"\n\ndescribe \"margin\" do\n before(:all) do\n ParserSupport.parse_file(\"library/margin\")\n end\n\n co"
},
{
"path": "spec/bourbon/library/modular_scale_spec.rb",
"chars": 1346,
"preview": "require \"spec_helper\"\n\ndescribe \"modular-scale\" do\n before(:all) do\n ParserSupport.parse_file(\"library/modular-scale"
},
{
"path": "spec/bourbon/library/overflow_wrap_spec.rb",
"chars": 651,
"preview": "require \"spec_helper\"\n\ndescribe \"overflow-wrap\" do\n before(:all) do\n ParserSupport.parse_file(\"library/overflow-wrap"
},
{
"path": "spec/bourbon/library/padding_spec.rb",
"chars": 1253,
"preview": "require \"spec_helper\"\n\ndescribe \"padding\" do\n before(:all) do\n ParserSupport.parse_file(\"library/padding\")\n end\n\n "
},
{
"path": "spec/bourbon/library/position_spec.rb",
"chars": 1814,
"preview": "require \"spec_helper\"\n\ndescribe \"position\" do\n before(:all) do\n ParserSupport.parse_file(\"library/position\")\n end\n\n"
},
{
"path": "spec/bourbon/library/prefixer_spec.rb",
"chars": 796,
"preview": "require \"spec_helper\"\n\ndescribe \"prefixer\" do\n before(:all) do\n ParserSupport.parse_file(\"library/prefixer\")\n end\n\n"
},
{
"path": "spec/bourbon/library/shade_spec.rb",
"chars": 637,
"preview": "require \"spec_helper\"\n\ndescribe \"shade\" do\n before(:all) do\n ParserSupport.parse_file(\"library/shade\")\n end\n\n cont"
},
{
"path": "spec/bourbon/library/size_spec.rb",
"chars": 678,
"preview": "require \"spec_helper\"\n\ndescribe \"size\" do\n before(:all) do\n ParserSupport.parse_file(\"library/size\")\n end\n\n contex"
},
{
"path": "spec/bourbon/library/strip_unit_spec.rb",
"chars": 603,
"preview": "require \"spec_helper\"\n\ndescribe \"strip-unit\" do\n before(:all) do\n ParserSupport.parse_file(\"library/strip-unit\")\n e"
},
{
"path": "spec/bourbon/library/text_inputs_spec.rb",
"chars": 1818,
"preview": "require \"spec_helper\"\n\ndescribe \"text-inputs\" do\n before(:all) do\n ParserSupport.parse_file(\"library/text-inputs\")\n\n"
},
{
"path": "spec/bourbon/library/tint_spec.rb",
"chars": 625,
"preview": "require \"spec_helper\"\n\ndescribe \"tint\" do\n before(:all) do\n ParserSupport.parse_file(\"library/tint\")\n end\n\n contex"
},
{
"path": "spec/bourbon/library/triangle_spec.rb",
"chars": 858,
"preview": "require \"spec_helper\"\n\ndescribe \"triangle\" do\n before(:all) do\n ParserSupport.parse_file(\"library/triangle\")\n end\n\n"
},
{
"path": "spec/bourbon/utilities/assign_inputs_spec.rb",
"chars": 1185,
"preview": "require \"spec_helper\"\n\ndescribe \"assign-inputs\" do\n before(:all) do\n ParserSupport.parse_file(\"utilities/assign-inpu"
},
{
"path": "spec/bourbon/utilities/compact_shorthand_spec.rb",
"chars": 887,
"preview": "require \"spec_helper\"\n\ndescribe \"compact-shorthand\" do\n before(:all) do\n ParserSupport.parse_file(\"utilities/compact"
},
{
"path": "spec/bourbon/utilities/contrast_ratio_spec.rb",
"chars": 526,
"preview": "require \"spec_helper\"\n\ndescribe \"contrast-ratio\" do\n before(:all) do\n ParserSupport.parse_file(\"utilities/contrast-r"
},
{
"path": "spec/bourbon/utilities/directional_property_spec.rb",
"chars": 820,
"preview": "require \"spec_helper\"\n\ndescribe \"directional-property\" do\n before(:all) do\n ParserSupport.parse_file(\"utilities/dire"
},
{
"path": "spec/bourbon/utilities/fetch_bourbon_setting_spec.rb",
"chars": 929,
"preview": "require \"spec_helper\"\n\ndescribe \"fetch-bourbon-setting\" do\n before(:all) do\n ParserSupport.parse_file(\"utilities/fet"
},
{
"path": "spec/bourbon/utilities/font_source_declaration_spec.rb",
"chars": 641,
"preview": "require \"spec_helper\"\n\ndescribe \"font-source-declaration\" do\n before(:all) do\n ParserSupport.parse_file(\"utilities/f"
},
{
"path": "spec/bourbon/utilities/gamma_spec.rb",
"chars": 493,
"preview": "require \"spec_helper\"\n\ndescribe \"gamma\" do\n before(:all) do\n ParserSupport.parse_file(\"utilities/gamma\")\n end\n\n co"
},
{
"path": "spec/bourbon/utilities/lightness_spec.rb",
"chars": 719,
"preview": "require \"spec_helper\"\n\ndescribe \"lightness\" do\n before(:all) do\n ParserSupport.parse_file(\"utilities/lightness\")\n e"
},
{
"path": "spec/bourbon/utilities/unpack_spec.rb",
"chars": 834,
"preview": "require \"spec_helper\"\n\ndescribe \"unpack\" do\n before(:all) do\n ParserSupport.parse_file(\"utilities/unpack\")\n end\n\n "
},
{
"path": "spec/bourbon/validators/contains_spec.rb",
"chars": 637,
"preview": "require \"spec_helper\"\n\ndescribe \"contains\" do\n before(:all) do\n ParserSupport.parse_file(\"validators/contains\")\n en"
},
{
"path": "spec/bourbon/validators/is_length_spec.rb",
"chars": 1464,
"preview": "require \"spec_helper\"\n\ndescribe \"is-length\" do\n before(:all) do\n ParserSupport.parse_file(\"validators/is-length\")\n "
},
{
"path": "spec/bourbon/validators/is_number_spec.rb",
"chars": 904,
"preview": "require \"spec_helper\"\n\ndescribe \"is-number\" do\n before(:all) do\n ParserSupport.parse_file(\"validators/is-number\")\n "
},
{
"path": "spec/bourbon/validators/is_size_spec.rb",
"chars": 890,
"preview": "require \"spec_helper\"\n\ndescribe \"is-size\" do\n before(:all) do\n ParserSupport.parse_file(\"validators/is-size\")\n end\n"
},
{
"path": "spec/fixtures/_setup.scss",
"chars": 24,
"preview": "@import \"core/bourbon\";\n"
},
{
"path": "spec/fixtures/library/border-color.scss",
"chars": 433,
"preview": "@import \"setup\";\n\n$red: #f00;\n$blue: #0f0;\n$green: #00f;\n$purple: #ff0;\n\n.border-color-all {\n @include border-color($re"
},
{
"path": "spec/fixtures/library/border-radius.scss",
"chars": 265,
"preview": "@import \"setup\";\n\n.border-top-radius {\n @include border-top-radius(1em);\n}\n\n.border-left-radius {\n @include border-lef"
},
{
"path": "spec/fixtures/library/border-style.scss",
"chars": 378,
"preview": "@import \"setup\";\n\n.border-style-all {\n @include border-style(solid);\n}\n\n.border-style-alternate {\n @include border-sty"
},
{
"path": "spec/fixtures/library/border-width.scss",
"chars": 351,
"preview": "@import \"setup\";\n\n.border-width-all {\n @include border-width(1px);\n}\n\n.border-width-alternate {\n @include border-width"
},
{
"path": "spec/fixtures/library/buttons.scss",
"chars": 227,
"preview": "@import \"setup\";\n\n.all-buttons {\n content: $all-buttons;\n}\n\n.all-buttons-active {\n content: $all-buttons-active;\n}\n\n.a"
},
{
"path": "spec/fixtures/library/clearfix.scss",
"chars": 53,
"preview": "@import \"setup\";\n\n.clearfix {\n @include clearfix;\n}\n"
},
{
"path": "spec/fixtures/library/contrast-switch.scss",
"chars": 164,
"preview": "@import \"setup\";\n\n.contrast-switch-light-base {\n color: contrast-switch(#bae6e6);\n}\n\n.contrast-switch-dark-base {\n col"
},
{
"path": "spec/fixtures/library/ellipsis.scss",
"chars": 53,
"preview": "@import \"setup\";\n\n.ellipsis {\n @include ellipsis;\n}\n"
},
{
"path": "spec/fixtures/library/font-face-1.scss",
"chars": 113,
"preview": "@import \"setup\";\n\n@include font-face(\n \"source-sans-pro\",\n \"/fonts/source-sans-pro/source-sans-pro-regular\"\n);\n"
},
{
"path": "spec/fixtures/library/font-face-2.scss",
"chars": 140,
"preview": "@import \"setup\";\n\n@include font-face(\n \"calibre\",\n \"fonts/calibre\"\n) {\n font-style: normal;\n font-weight: 600;\n uni"
},
{
"path": "spec/fixtures/library/font-face-3.scss",
"chars": 105,
"preview": "@import \"setup\";\n\n@include font-face(\n \"pitch\",\n \"/fonts/pitch\",\n \"woff2\",\n $asset-pipeline: true\n);\n"
},
{
"path": "spec/fixtures/library/font-stacks.scss",
"chars": 511,
"preview": "@import \"setup\";\n\n.helvetica {\n content: $font-stack-helvetica;\n}\n\n.lucida-grande {\n content: $font-stack-lucida-grand"
},
{
"path": "spec/fixtures/library/hide-text.scss",
"chars": 55,
"preview": "@import \"setup\";\n\n.hide-text {\n @include hide-text;\n}\n"
},
{
"path": "spec/fixtures/library/hide-visually.scss",
"chars": 127,
"preview": "@import \"setup\";\n\n.hide-visually {\n @include hide-visually;\n}\n\n.hide-visually--unhide {\n @include hide-visually(\"unhid"
},
{
"path": "spec/fixtures/library/margin.scss",
"chars": 291,
"preview": "@import \"setup\";\n\n.margin-all {\n @include margin(1px);\n}\n\n.margin-alternate {\n @include margin(2px 3px);\n}\n\n.margin-im"
},
{
"path": "spec/fixtures/library/modular-scale.scss",
"chars": 453,
"preview": "@import \"setup\";\n\n.one {\n &-base-two {\n font-size: modular-scale(1, $value: 2em);\n }\n\n &-base-three {\n font-siz"
},
{
"path": "spec/fixtures/library/overflow-wrap.scss",
"chars": 124,
"preview": "@import \"setup\";\n\n.overflow-wrap {\n @include overflow-wrap;\n}\n\n.overflow-wrap-normal {\n @include overflow-wrap(normal)"
},
{
"path": "spec/fixtures/library/padding.scss",
"chars": 301,
"preview": "@import \"setup\";\n\n.padding-all {\n @include padding(1px);\n}\n\n.padding-alternate {\n @include padding(2px 3px);\n}\n\n.paddi"
},
{
"path": "spec/fixtures/library/position.scss",
"chars": 353,
"preview": "@import \"setup\";\n\n.position-all {\n @include position(fixed, 1em);\n}\n\n.position-alternate {\n @include position(absolute"
},
{
"path": "spec/fixtures/library/prefixer.scss",
"chars": 216,
"preview": "@import \"setup\";\n\n.prefix {\n @include prefixer(appearance, none);\n}\n\n.prefix--webkit {\n @include prefixer(appearance, "
},
{
"path": "spec/fixtures/library/shade.scss",
"chars": 194,
"preview": "@import \"setup\";\n\n.shade-white {\n color: shade(#fff, 75%);\n}\n\n.shade-black {\n color: shade(#000, 50%);\n}\n\n.shade-red {"
},
{
"path": "spec/fixtures/library/size.scss",
"chars": 149,
"preview": "@import \"setup\";\n\n.size-implicit {\n @include size(10px);\n}\n\n.size-both {\n @include size(1em, 2em);\n}\n\n.size-auto {\n @"
},
{
"path": "spec/fixtures/library/strip-unit.scss",
"chars": 167,
"preview": "@import \"setup\";\n\n.px {\n width: strip-unit(10px);\n}\n\n.em {\n width: strip-unit(2em);\n}\n\n.rem {\n width: strip-unit(1.5r"
},
{
"path": "spec/fixtures/library/text-inputs.scss",
"chars": 326,
"preview": "@import \"setup\";\n\n.all-text-inputs {\n content: $all-text-inputs;\n}\n\n.all-text-inputs-active {\n content: $all-text-inpu"
},
{
"path": "spec/fixtures/library/tint.scss",
"chars": 186,
"preview": "@import \"setup\";\n\n.tint-white {\n color: tint(#fff, 75%);\n}\n\n.tint-black {\n color: tint(#000, 50%);\n}\n\n.tint-red {\n co"
},
{
"path": "spec/fixtures/library/triangle.scss",
"chars": 153,
"preview": "@import \"setup\";\n\n.triangle--up {\n @include triangle(\"up\", 2rem, 1rem, #b25c9c);\n}\n\n.triangle--right {\n @include trian"
},
{
"path": "spec/fixtures/utilities/assign-inputs.scss",
"chars": 280,
"preview": "@import \"setup\";\n\n#{_assign-inputs($_text-inputs-list)} {\n color: #f00;\n}\n\n#{_assign-inputs($_text-inputs-list, active)"
},
{
"path": "spec/fixtures/utilities/compact-shorthand.scss",
"chars": 362,
"preview": "@import \"setup\";\n\n.four-values-a {\n padding: _compact-shorthand(10px 20px 30px 40px);\n}\n\n.four-values-b {\n padding: _c"
},
{
"path": "spec/fixtures/utilities/contrast-ratio.scss",
"chars": 150,
"preview": "@import \"setup\";\n\n.contrast-ratio-black {\n content: _contrast-ratio(#fff, #000);\n}\n\n.contrast-ratio-blue {\n content: _"
},
{
"path": "spec/fixtures/utilities/directional-property.scss",
"chars": 332,
"preview": "@import \"setup\";\n\n.border-all {\n @include _directional-property(border, width, 2px 5px 8px 12px);\n}\n\n.border-top {\n @i"
},
{
"path": "spec/fixtures/utilities/fetch-bourbon-setting.scss",
"chars": 323,
"preview": "@import \"setup\";\n\n$bourbon: (\n \"global-font-file-formats\": (\"woff2\", \"woff\"),\n \"rails-asset-pipeline\": true,\n);\n\n.test"
},
{
"path": "spec/fixtures/utilities/font-source-declaration.scss",
"chars": 218,
"preview": "@import \"setup\";\n\n$file-formats: (\"woff2\", \"woff\");\n\n.has-pipeline {\n src: _font-source-declaration(\"a\", \"b\", true, $fi"
},
{
"path": "spec/fixtures/utilities/gamma.scss",
"chars": 106,
"preview": "@import \"setup\";\n\n.gamma {\n content: _gamma(100 / 255);\n}\n\n.gamma-full {\n content: _gamma(255 / 255);\n}\n"
},
{
"path": "spec/fixtures/utilities/lightness.scss",
"chars": 185,
"preview": "@import \"setup\";\n\n.lightness-black {\n content: _lightness(#000);\n}\n\n.lightness-white {\n content: _lightness(#fff);\n}\n\n"
},
{
"path": "spec/fixtures/utilities/unpack.scss",
"chars": 250,
"preview": "@import \"setup\";\n\n.single {\n padding: _unpack-shorthand(10px);\n}\n\n.double {\n padding: _unpack-shorthand(1em 2em);\n}\n\n."
},
{
"path": "spec/fixtures/validators/contains.scss",
"chars": 469,
"preview": "@import \"setup\";\n\n$single: \"apple\";\n$multiple: \"pineapple\", \"banana\", \"cumquat\";\n\n@mixin color-contains($list, $values) "
},
{
"path": "spec/fixtures/validators/is-length.scss",
"chars": 538,
"preview": "@import \"setup\";\n\n@mixin color-length($value) {\n @if _is-length($value) {\n color: #fff;\n }\n}\n\n.integer {\n @include"
},
{
"path": "spec/fixtures/validators/is-number.scss",
"chars": 355,
"preview": "@import \"setup\";\n\n@mixin line-height($number) {\n @if _is-number($number) {\n line-height: $number;\n }\n}\n\n.integer {\n"
},
{
"path": "spec/fixtures/validators/is-size.scss",
"chars": 346,
"preview": "@import \"setup\";\n\n@mixin size-margin($size) {\n @if _is-size($size) {\n margin-top: $size;\n }\n}\n\n.integer {\n @includ"
},
{
"path": "spec/spec_helper.rb",
"chars": 498,
"preview": "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), \"..\", \"lib\"))\n$LOAD_PATH.unshift(File.dirname(__FILE__))\nrequire \"r"
},
{
"path": "spec/support/matchers/have_rule.rb",
"chars": 755,
"preview": "RSpec::Matchers.define :have_rule do |expected|\n match do |selector|\n @rules = rules_from_selector(selector)\n @ru"
},
{
"path": "spec/support/matchers/have_ruleset.rb",
"chars": 523,
"preview": "RSpec::Matchers.define :have_ruleset do |expected|\n match do |selector|\n @ruleset = rules_from_selector(selector)\n "
},
{
"path": "spec/support/matchers/have_value.rb",
"chars": 540,
"preview": "RSpec::Matchers.define :have_value do |expected|\n match do |variable|\n selector_class = variable.sub(\"$\", \".\")\n @"
},
{
"path": "spec/support/parser_support.rb",
"chars": 349,
"preview": "module ParserSupport\n def self.parser\n @parser ||= CssParser::Parser.new\n end\n\n def self.parse_file(identifier)\n "
},
{
"path": "spec/support/sass_support.rb",
"chars": 198,
"preview": "module SassSupport\n def generate_css\n FileUtils.mkdir(\"tmp\")\n `sass -I . spec/fixtures:tmp --update --precision=5"
}
]
About this extraction
This page contains the full source code of the thoughtbot/bourbon GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 163 files (136.5 KB), approximately 44.5k tokens, and a symbol index with 30 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.