bourbon 4.2.4 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +34 -0
- data/.github/ISSUE_TEMPLATE.md +22 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +10 -0
- data/.gitignore +1 -1
- data/.hound.yml +3 -1
- data/.npmignore +7 -4
- data/.stylelintrc.json +3 -0
- data/.tool-versions +2 -0
- data/CHANGELOG.md +415 -0
- data/CODE_OF_CONDUCT.md +6 -0
- data/CONTRIBUTING.md +81 -28
- data/Gemfile +1 -1
- data/LICENSE.md +1 -1
- data/README.md +164 -86
- data/RELEASING.md +33 -0
- data/Rakefile +0 -2
- data/bin/bourbon +1 -2
- data/bourbon.gemspec +30 -24
- data/core/_bourbon.scss +54 -0
- data/core/bourbon/helpers/_buttons-list.scss +14 -0
- data/core/bourbon/helpers/_scales.scss +27 -0
- data/core/bourbon/helpers/_text-inputs-list.scss +26 -0
- data/core/bourbon/library/_border-color.scss +26 -0
- data/core/bourbon/library/_border-radius.scss +85 -0
- data/core/bourbon/library/_border-style.scss +25 -0
- data/core/bourbon/library/_border-width.scss +25 -0
- data/core/bourbon/library/_buttons.scss +84 -0
- data/{app/assets/stylesheets/addons → core/bourbon/library}/_clearfix.scss +5 -5
- data/core/bourbon/library/_contrast-switch.scss +81 -0
- data/{app/assets/stylesheets/addons → core/bourbon/library}/_ellipsis.scss +12 -6
- data/core/bourbon/library/_font-face.scss +65 -0
- data/core/bourbon/library/_font-stacks.scss +248 -0
- data/core/bourbon/library/_hide-text.scss +24 -0
- data/core/bourbon/library/_hide-visually.scss +70 -0
- data/core/bourbon/library/_margin.scss +37 -0
- data/core/bourbon/library/_modular-scale.scss +120 -0
- data/core/bourbon/library/_overflow-wrap.scss +28 -0
- data/core/bourbon/library/_padding.scss +36 -0
- data/core/bourbon/library/_position.scss +62 -0
- data/core/bourbon/library/_prefixer.scss +37 -0
- data/core/bourbon/library/_shade.scss +32 -0
- data/core/bourbon/library/_size.scss +50 -0
- data/core/bourbon/library/_strip-unit.scss +17 -0
- data/core/bourbon/library/_text-inputs.scss +163 -0
- data/core/bourbon/library/_timing-functions.scss +36 -0
- data/core/bourbon/library/_tint.scss +32 -0
- data/core/bourbon/library/_triangle.scss +82 -0
- data/core/bourbon/library/_value-prefixer.scss +37 -0
- data/core/bourbon/settings/_settings.scss +75 -0
- data/core/bourbon/utilities/_assign-inputs.scss +28 -0
- data/core/bourbon/utilities/_compact-shorthand.scss +42 -0
- data/core/bourbon/utilities/_contrast-ratio.scss +31 -0
- data/core/bourbon/utilities/_directional-property.scss +68 -0
- data/core/bourbon/utilities/_fetch-bourbon-setting.scss +16 -0
- data/{app/assets/stylesheets/helpers → core/bourbon/utilities}/_font-source-declaration.scss +23 -15
- data/core/bourbon/utilities/_gamma.scss +24 -0
- data/core/bourbon/utilities/_lightness.scss +24 -0
- data/{app/assets/stylesheets/functions/_unpack.scss → core/bourbon/utilities/_unpack-shorthand.scss} +8 -6
- data/{app/assets/stylesheets/functions → core/bourbon/validators}/_contains-falsy.scss +6 -6
- data/{app/assets/stylesheets/functions → core/bourbon/validators}/_contains.scss +8 -8
- data/core/bourbon/validators/_is-color.scss +13 -0
- data/{app/assets/stylesheets/functions → core/bourbon/validators}/_is-length.scss +6 -2
- data/core/bourbon/validators/_is-number.scss +15 -0
- data/core/bourbon/validators/_is-size.scss +18 -0
- data/eyeglass-exports.js +7 -0
- data/features/install.feature +0 -1
- data/features/step_definitions/bourbon_steps.rb +13 -5
- data/features/update.feature +0 -1
- data/features/version.feature +0 -2
- data/index.js +2 -2
- data/lib/bourbon/generator.rb +11 -10
- data/lib/bourbon/version.rb +1 -1
- data/lib/bourbon.rb +6 -19
- data/package-lock.json +3449 -0
- data/package.json +24 -13
- data/spec/bourbon/{addons → library}/border_color_spec.rb +8 -8
- data/spec/bourbon/{addons → library}/border_radius_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/border_style_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/border_width_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/buttons_spec.rb +4 -4
- data/spec/bourbon/{addons → library}/clearfix_spec.rb +3 -3
- data/spec/bourbon/library/contrast_switch_spec.rb +23 -0
- data/spec/bourbon/{addons → library}/ellipsis_spec.rb +1 -1
- data/spec/bourbon/library/font_face_spec_1.rb +16 -0
- data/spec/bourbon/library/font_face_spec_2.rb +21 -0
- data/spec/bourbon/library/font_face_spec_3.rb +16 -0
- data/spec/bourbon/library/font_face_spec_4.rb +17 -0
- data/spec/bourbon/library/font_stacks_spec.rb +42 -0
- data/spec/bourbon/{addons → library}/hide_text_spec.rb +1 -1
- data/spec/bourbon/library/hide_visually_spec.rb +37 -0
- data/spec/bourbon/{addons → library}/margin_spec.rb +1 -1
- data/spec/bourbon/{functions → library}/modular_scale_spec.rb +6 -6
- data/spec/bourbon/library/overflow_wrap_spec.rb +27 -0
- data/spec/bourbon/{addons → library}/padding_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/position_spec.rb +1 -1
- data/spec/bourbon/library/prefixer_spec.rb +34 -0
- data/spec/bourbon/{functions → library}/shade_spec.rb +1 -1
- data/spec/bourbon/{addons → library}/size_spec.rb +1 -1
- data/spec/bourbon/{functions/strip_units_spec.rb → library/strip_unit_spec.rb} +2 -2
- data/spec/bourbon/{addons → library}/text_inputs_spec.rb +25 -15
- data/spec/bourbon/{functions → library}/tint_spec.rb +1 -1
- data/spec/bourbon/library/triangle_spec.rb +31 -0
- data/spec/bourbon/{functions → utilities}/assign_inputs_spec.rb +8 -8
- data/spec/bourbon/utilities/compact_shorthand_spec.rb +30 -0
- data/spec/bourbon/utilities/contrast_ratio_spec.rb +23 -0
- data/spec/bourbon/utilities/directional_property_spec.rb +28 -0
- data/spec/bourbon/utilities/fetch_bourbon_setting_spec.rb +31 -0
- data/spec/bourbon/{helpers → utilities}/font_source_declaration_spec.rb +1 -1
- data/spec/bourbon/utilities/gamma_spec.rb +23 -0
- data/spec/bourbon/utilities/lightness_spec.rb +31 -0
- data/spec/bourbon/{functions → utilities}/unpack_spec.rb +1 -1
- data/spec/bourbon/{functions → validators}/contains_spec.rb +1 -1
- data/spec/bourbon/{functions → validators}/is_length_spec.rb +1 -1
- data/spec/bourbon/{functions → validators}/is_number_spec.rb +1 -1
- data/spec/bourbon/{functions → validators}/is_size_spec.rb +1 -1
- data/spec/fixtures/_setup.scss +1 -1
- data/spec/fixtures/{addons → library}/border-color.scss +4 -4
- data/spec/fixtures/{addons → library}/border-radius.scss +0 -0
- data/spec/fixtures/{addons → library}/border-style.scss +0 -0
- data/spec/fixtures/{addons → library}/border-width.scss +0 -0
- data/spec/fixtures/{addons → library}/buttons.scss +0 -0
- data/spec/fixtures/{addons → library}/clearfix.scss +0 -0
- data/spec/fixtures/library/contrast-switch.scss +9 -0
- data/spec/fixtures/{addons → library}/ellipsis.scss +0 -0
- data/spec/fixtures/library/font-face-1.scss +6 -0
- data/spec/fixtures/library/font-face-2.scss +10 -0
- data/spec/fixtures/library/font-face-3.scss +8 -0
- data/spec/fixtures/library/font-face-4.scss +7 -0
- data/spec/fixtures/library/font-stacks.scss +41 -0
- data/spec/fixtures/{addons → library}/hide-text.scss +0 -0
- data/spec/fixtures/library/hide-visually.scss +9 -0
- data/spec/fixtures/{addons → library}/margin.scss +0 -0
- data/spec/fixtures/{functions → library}/modular-scale.scss +0 -0
- data/spec/fixtures/library/overflow-wrap.scss +9 -0
- data/spec/fixtures/{addons → library}/padding.scss +0 -0
- data/spec/fixtures/{addons → library}/position.scss +0 -4
- data/spec/fixtures/library/prefixer.scss +13 -0
- data/spec/fixtures/{functions → library}/shade.scss +1 -1
- data/spec/fixtures/{addons → library}/size.scss +2 -2
- data/spec/fixtures/library/strip-unit.scss +17 -0
- data/spec/fixtures/{addons → library}/text-inputs.scss +4 -0
- data/spec/fixtures/{functions → library}/tint.scss +1 -1
- data/spec/fixtures/library/triangle.scss +9 -0
- data/spec/fixtures/utilities/assign-inputs.scss +19 -0
- data/spec/fixtures/utilities/compact-shorthand.scss +21 -0
- data/spec/fixtures/utilities/contrast-ratio.scss +9 -0
- data/spec/fixtures/utilities/directional-property.scss +17 -0
- data/spec/fixtures/utilities/fetch-bourbon-setting.scss +16 -0
- data/spec/fixtures/utilities/font-source-declaration.scss +11 -0
- data/spec/fixtures/utilities/gamma.scss +9 -0
- data/spec/fixtures/utilities/lightness.scss +13 -0
- data/spec/fixtures/utilities/unpack.scss +17 -0
- data/spec/fixtures/{functions → validators}/contains.scss +1 -1
- data/spec/fixtures/{functions → validators}/is-length.scss +1 -1
- data/spec/fixtures/{functions → validators}/is-number.scss +1 -1
- data/spec/fixtures/{functions → validators}/is-size.scss +1 -1
- data/spec/support/matchers/have_value.rb +1 -1
- metadata +246 -282
- data/.scss-lint.yml +0 -14
- data/.travis.yml +0 -8
- data/app/assets/stylesheets/_bourbon-deprecated-upcoming.scss +0 -411
- data/app/assets/stylesheets/_bourbon.scss +0 -87
- data/app/assets/stylesheets/addons/_border-color.scss +0 -26
- data/app/assets/stylesheets/addons/_border-radius.scss +0 -48
- data/app/assets/stylesheets/addons/_border-style.scss +0 -25
- data/app/assets/stylesheets/addons/_border-width.scss +0 -25
- data/app/assets/stylesheets/addons/_buttons.scss +0 -64
- data/app/assets/stylesheets/addons/_font-stacks.scss +0 -31
- data/app/assets/stylesheets/addons/_hide-text.scss +0 -27
- data/app/assets/stylesheets/addons/_margin.scss +0 -26
- data/app/assets/stylesheets/addons/_padding.scss +0 -26
- data/app/assets/stylesheets/addons/_position.scss +0 -48
- data/app/assets/stylesheets/addons/_prefixer.scss +0 -66
- data/app/assets/stylesheets/addons/_retina-image.scss +0 -25
- data/app/assets/stylesheets/addons/_size.scss +0 -51
- data/app/assets/stylesheets/addons/_text-inputs.scss +0 -113
- data/app/assets/stylesheets/addons/_timing-functions.scss +0 -34
- data/app/assets/stylesheets/addons/_triangle.scss +0 -63
- data/app/assets/stylesheets/addons/_word-wrap.scss +0 -29
- data/app/assets/stylesheets/css3/_animation.scss +0 -43
- data/app/assets/stylesheets/css3/_appearance.scss +0 -3
- data/app/assets/stylesheets/css3/_backface-visibility.scss +0 -3
- data/app/assets/stylesheets/css3/_background-image.scss +0 -42
- data/app/assets/stylesheets/css3/_background.scss +0 -55
- data/app/assets/stylesheets/css3/_border-image.scss +0 -59
- data/app/assets/stylesheets/css3/_calc.scss +0 -4
- data/app/assets/stylesheets/css3/_columns.scss +0 -47
- data/app/assets/stylesheets/css3/_filter.scss +0 -4
- data/app/assets/stylesheets/css3/_flex-box.scss +0 -287
- data/app/assets/stylesheets/css3/_font-face.scss +0 -24
- data/app/assets/stylesheets/css3/_font-feature-settings.scss +0 -4
- data/app/assets/stylesheets/css3/_hidpi-media-query.scss +0 -10
- data/app/assets/stylesheets/css3/_hyphens.scss +0 -4
- data/app/assets/stylesheets/css3/_image-rendering.scss +0 -14
- data/app/assets/stylesheets/css3/_keyframes.scss +0 -36
- data/app/assets/stylesheets/css3/_linear-gradient.scss +0 -38
- data/app/assets/stylesheets/css3/_perspective.scss +0 -8
- data/app/assets/stylesheets/css3/_placeholder.scss +0 -8
- data/app/assets/stylesheets/css3/_radial-gradient.scss +0 -39
- data/app/assets/stylesheets/css3/_selection.scss +0 -42
- data/app/assets/stylesheets/css3/_text-decoration.scss +0 -19
- data/app/assets/stylesheets/css3/_transform.scss +0 -15
- data/app/assets/stylesheets/css3/_transition.scss +0 -71
- data/app/assets/stylesheets/css3/_user-select.scss +0 -3
- data/app/assets/stylesheets/functions/_assign-inputs.scss +0 -11
- data/app/assets/stylesheets/functions/_is-light.scss +0 -21
- data/app/assets/stylesheets/functions/_is-number.scss +0 -11
- data/app/assets/stylesheets/functions/_is-size.scss +0 -13
- data/app/assets/stylesheets/functions/_modular-scale.scss +0 -69
- data/app/assets/stylesheets/functions/_px-to-em.scss +0 -13
- data/app/assets/stylesheets/functions/_px-to-rem.scss +0 -15
- data/app/assets/stylesheets/functions/_shade.scss +0 -24
- data/app/assets/stylesheets/functions/_strip-units.scss +0 -17
- data/app/assets/stylesheets/functions/_tint.scss +0 -24
- data/app/assets/stylesheets/functions/_transition-property-name.scss +0 -22
- data/app/assets/stylesheets/helpers/_convert-units.scss +0 -21
- data/app/assets/stylesheets/helpers/_directional-values.scss +0 -96
- data/app/assets/stylesheets/helpers/_gradient-positions-parser.scss +0 -13
- data/app/assets/stylesheets/helpers/_linear-angle-parser.scss +0 -25
- data/app/assets/stylesheets/helpers/_linear-gradient-parser.scss +0 -41
- data/app/assets/stylesheets/helpers/_linear-positions-parser.scss +0 -61
- data/app/assets/stylesheets/helpers/_linear-side-corner-parser.scss +0 -31
- data/app/assets/stylesheets/helpers/_radial-arg-parser.scss +0 -69
- data/app/assets/stylesheets/helpers/_radial-gradient-parser.scss +0 -50
- data/app/assets/stylesheets/helpers/_radial-positions-parser.scss +0 -18
- data/app/assets/stylesheets/helpers/_render-gradients.scss +0 -26
- data/app/assets/stylesheets/helpers/_shape-size-stripper.scss +0 -10
- data/app/assets/stylesheets/helpers/_str-to-num.scss +0 -50
- data/app/assets/stylesheets/settings/_asset-pipeline.scss +0 -7
- data/app/assets/stylesheets/settings/_prefixer.scss +0 -9
- data/app/assets/stylesheets/settings/_px-to-em.scss +0 -1
- data/bower.json +0 -36
- data/lib/bourbon/engine.rb +0 -5
- data/lib/tasks/install.rake +0 -20
- data/sache.json +0 -5
- data/spec/bourbon/addons/font_stacks_spec.rb +0 -25
- data/spec/bourbon/addons/retina_image_spec.rb +0 -57
- data/spec/bourbon/addons/triangle_spec.rb +0 -32
- data/spec/bourbon/addons/word_wrap_spec.rb +0 -29
- data/spec/bourbon/css3/font_face_spec.rb +0 -45
- data/spec/bourbon/css3/hidpi_media_query_spec.rb +0 -23
- data/spec/bourbon/functions/is_light_spec.rb +0 -37
- data/spec/bourbon/functions/px_to_em_spec.rb +0 -31
- data/spec/bourbon/functions/px_to_rem_spec.rb +0 -25
- data/spec/bourbon/helpers/convert_units_spec.rb +0 -31
- data/spec/bourbon/helpers/directional_values_spec.rb +0 -39
- data/spec/bourbon/helpers/str_to_num_spec.rb +0 -25
- data/spec/fixtures/addons/font-stacks.scss +0 -21
- data/spec/fixtures/addons/retina-image.scss +0 -21
- data/spec/fixtures/addons/triangle.scss +0 -9
- data/spec/fixtures/addons/word-wrap.scss +0 -9
- data/spec/fixtures/css3/font-face.scss +0 -6
- data/spec/fixtures/css3/hidpi-media-query.scss +0 -13
- data/spec/fixtures/functions/assign-inputs.scss +0 -19
- data/spec/fixtures/functions/is-light.scss +0 -29
- data/spec/fixtures/functions/px-to-em.scss +0 -17
- data/spec/fixtures/functions/px-to-rem.scss +0 -15
- data/spec/fixtures/functions/strip-units.scss +0 -17
- data/spec/fixtures/functions/unpack.scss +0 -17
- data/spec/fixtures/helpers/convert-units.scss +0 -17
- data/spec/fixtures/helpers/directional-values.scss +0 -29
- data/spec/fixtures/helpers/font-source-declaration.scss +0 -10
- data/spec/fixtures/helpers/str-to-num.scss +0 -13
- data/spec/support/matchers/be_contained_in.rb +0 -10
data/LICENSE.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright © 2011
|
3
|
+
Copyright © 2011-2019 [thoughtbot, inc.](http://thoughtbot.com)
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the “Software”), to deal
|
data/README.md
CHANGED
@@ -1,140 +1,218 @@
|
|
1
|
-
[
|
1
|
+
[<img src="https://images.thoughtbot.com/bourbon/bourbon-logo.svg" width="200" alt="Bourbon logo">][Bourbon]
|
2
2
|
|
3
|
-
[![
|
4
|
-
[![Code Climate](http://img.shields.io/codeclimate/github/thoughtbot/bourbon.svg?style=flat)](https://codeclimate.com/github/thoughtbot/bourbon)
|
5
|
-
[![Gitter chat](https://img.shields.io/badge/gitter-thoughtbot/bourbon-ae3dd2.svg?style=flat)](https://gitter.im/thoughtbot/bourbon)
|
6
|
-
[![Stack Overflow](http://img.shields.io/badge/stack%20overflow-bourbon-ae3dd2.svg?style=flat)](http://stackoverflow.com/questions/tagged/bourbon)
|
3
|
+
[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
|
7
4
|
|
8
|
-
## A
|
5
|
+
## A Lightweight Sass Tool Set
|
9
6
|
|
10
|
-
Bourbon is a library of
|
7
|
+
[Bourbon] is a library of [Sass] mixins and functions that are designed to make
|
8
|
+
you a more efficient style sheet author.
|
11
9
|
|
12
|
-
|
10
|
+
It is…
|
13
11
|
|
14
|
-
-
|
15
|
-
-
|
16
|
-
-
|
12
|
+
- Dependency-free: Bourbon is pure Sass.
|
13
|
+
- Human-readable: We aim for clarity over brevity.
|
14
|
+
- Lightweight: Zero output post-install and has no visual opinion.
|
17
15
|
|
18
|
-
|
19
|
-
|
16
|
+
[Bourbon]: https://www.bourbon.io/
|
17
|
+
[Sass]: http://sass-lang.com
|
18
|
+
|
19
|
+
### Helpful Links
|
20
|
+
|
21
|
+
- [Documentation](https://www.bourbon.io/docs/latest/)
|
22
|
+
- [Change log](CHANGELOG.md)
|
23
|
+
- [Twitter](https://twitter.com/bourbonsass)
|
24
|
+
- [Stack Overflow](https://stackoverflow.com/questions/tagged/bourbon)
|
25
|
+
|
26
|
+
## Table of Contents
|
27
|
+
|
28
|
+
- [Requirements](#requirements)
|
29
|
+
- [Installation](#installation)
|
30
|
+
- [Command Line Interface](#command-line-interface)
|
31
|
+
- [Browser Support](#browser-support)
|
32
|
+
- [The Bourbon Family](#the-bourbon-family)
|
33
|
+
- [Contributing](#contributing)
|
34
|
+
- [License](#license)
|
35
|
+
- [About](#about)
|
20
36
|
|
21
37
|
## Requirements
|
22
38
|
|
23
|
-
- [Sass]
|
39
|
+
- [Sass] 3.4+ or [LibSass] 3.3+
|
24
40
|
|
25
|
-
|
41
|
+
[Sass]: https://github.com/sass/sass
|
42
|
+
[LibSass]: https://github.com/sass/libsass
|
26
43
|
|
27
|
-
|
44
|
+
## Installation
|
28
45
|
|
29
|
-
1. Install the Bourbon gem using the [RubyGems]
|
46
|
+
1. Install the Bourbon gem using the [RubyGems] package manager:
|
30
47
|
|
31
|
-
|
32
|
-
|
33
|
-
|
48
|
+
```bash
|
49
|
+
gem install bourbon
|
50
|
+
```
|
34
51
|
|
35
|
-
|
52
|
+
1. Install the Bourbon library into the current directory:
|
36
53
|
|
37
|
-
|
54
|
+
```bash
|
55
|
+
bourbon install
|
56
|
+
```
|
38
57
|
|
39
|
-
|
40
|
-
|
41
|
-
```
|
58
|
+
**Pro Tip:** You can target installation into a specific directory using the
|
59
|
+
`path` flag:
|
42
60
|
|
43
|
-
|
61
|
+
```bash
|
62
|
+
bourbon install --path my/custom/path/
|
63
|
+
```
|
44
64
|
|
45
|
-
|
46
|
-
bourbon install --path my/custom/path/
|
47
|
-
```
|
65
|
+
1. Import Bourbon at the beginning of your stylesheet:
|
48
66
|
|
49
|
-
|
67
|
+
```scss
|
68
|
+
@import "bourbon/bourbon";
|
69
|
+
```
|
50
70
|
|
51
|
-
|
52
|
-
|
53
|
-
|
71
|
+
It’s not recommended that you modify Bourbon’s files directly as it will
|
72
|
+
make updating to future versions difficult, by overwriting your custom
|
73
|
+
changes or causing merge conflicts.
|
54
74
|
|
55
|
-
|
75
|
+
[RubyGems]: https://rubygems.org
|
56
76
|
|
57
|
-
|
77
|
+
### Installation for Ruby on Rails 4.2+
|
58
78
|
|
59
79
|
1. Add Bourbon to your Gemfile:
|
60
80
|
|
61
|
-
|
62
|
-
|
63
|
-
|
81
|
+
```ruby
|
82
|
+
gem "bourbon"
|
83
|
+
```
|
84
|
+
|
85
|
+
1. Then run:
|
86
|
+
|
87
|
+
```bash
|
88
|
+
bundle install
|
89
|
+
```
|
90
|
+
|
91
|
+
1. Restart your server and rename `application.css` to `application.scss`:
|
92
|
+
|
93
|
+
```bash
|
94
|
+
mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
|
95
|
+
```
|
96
|
+
|
97
|
+
1. Delete _all_ Sprockets directives in `application.scss` (`require`,
|
98
|
+
`require_tree` and `require_self`) and use Sass’s native `@import` instead
|
99
|
+
([why?][sass-import]).
|
100
|
+
|
101
|
+
1. Import Bourbon at the beginning of `application.scss`. Any project styles
|
102
|
+
that utilize Bourbon’s features must be imported after Bourbon.
|
64
103
|
|
65
|
-
|
104
|
+
```scss
|
105
|
+
@import "bourbon";
|
106
|
+
@import "home";
|
107
|
+
@import "users";
|
108
|
+
```
|
66
109
|
|
67
|
-
|
68
|
-
bundle install
|
69
|
-
```
|
110
|
+
[sass-import]: https://content.pivotal.io/blog/structure-your-sass-files-with-import
|
70
111
|
|
71
|
-
|
112
|
+
### Installing with npm and using a Node-based asset pipeline
|
72
113
|
|
73
|
-
|
74
|
-
mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
|
75
|
-
```
|
114
|
+
1. Add Bourbon as a dependency:
|
76
115
|
|
77
|
-
|
116
|
+
```bash
|
117
|
+
npm install --save bourbon
|
118
|
+
```
|
78
119
|
|
79
|
-
|
120
|
+
1. If you’re using [eyeglass], skip to Step 3. Otherwise, you’ll need to add
|
121
|
+
Bourbon to your node-sass `includePaths` option.
|
122
|
+
`require("bourbon").includePaths` is an array of directories that you should
|
123
|
+
pass to node-sass. How you do this depends on how node-sass is integrated
|
124
|
+
into your project.
|
80
125
|
|
81
|
-
|
82
|
-
@import "bourbon";
|
83
|
-
@import "home";
|
84
|
-
@import "users";
|
85
|
-
```
|
126
|
+
1. Import Bourbon into your Sass files:
|
86
127
|
|
87
|
-
|
128
|
+
```scss
|
129
|
+
@import "bourbon";
|
130
|
+
```
|
88
131
|
|
89
|
-
|
132
|
+
[eyeglass]: https://github.com/sass-eyeglass/eyeglass
|
133
|
+
|
134
|
+
### Installing older versions of Bourbon
|
90
135
|
|
91
136
|
1. Uninstall any Bourbon gem versions you already have:
|
92
137
|
|
93
|
-
|
94
|
-
|
95
|
-
|
138
|
+
```bash
|
139
|
+
gem uninstall bourbon
|
140
|
+
```
|
141
|
+
|
142
|
+
1. Reinstall the Bourbon gem, using the `-v` flag to specify the version
|
143
|
+
you need:
|
144
|
+
|
145
|
+
```bash
|
146
|
+
gem install bourbon -v 4.2.7
|
147
|
+
```
|
148
|
+
|
149
|
+
1. Follow the [instructions above](#installation) to install Bourbon into
|
150
|
+
your project.
|
151
|
+
|
152
|
+
## Command Line Interface
|
153
|
+
|
154
|
+
```bash
|
155
|
+
bourbon [options]
|
156
|
+
```
|
96
157
|
|
97
|
-
|
158
|
+
### Options
|
98
159
|
|
99
|
-
|
100
|
-
|
101
|
-
|
160
|
+
| Option | Description |
|
161
|
+
| :---------------- | :------------------------ |
|
162
|
+
| `-h`, `--help` | Show help |
|
163
|
+
| `-v`, `--version` | Show the version number |
|
164
|
+
| `--path` | Specify a custom path |
|
165
|
+
| `--force` | Force install (overwrite) |
|
102
166
|
|
103
|
-
|
167
|
+
### Commands
|
104
168
|
|
105
|
-
|
169
|
+
| Command | Description |
|
170
|
+
| :---------------- | :---------------------------------------------------- |
|
171
|
+
| `bourbon install` | Install Bourbon into the current directory |
|
172
|
+
| `bourbon update` | Overwrite and update Bourbon in the current directory |
|
173
|
+
| `bourbon help` | Show help |
|
106
174
|
|
107
|
-
|
108
|
-
- Firefox 29+
|
109
|
-
- Internet Explorer 9+
|
110
|
-
- Opera 15+
|
111
|
-
- Safari 6.1+
|
175
|
+
## Browser Support
|
112
176
|
|
113
|
-
|
177
|
+
Bourbon supports Internet Explorer 11+ and the latest versions of Chrome,
|
178
|
+
Firefox, Safari, and Edge.
|
114
179
|
|
115
|
-
|
116
|
-
- [Neat](https://github.com/thoughtbot/neat): A lightweight semantic grid framework for Sass and Bourbon
|
117
|
-
- [Bitters](https://github.com/thoughtbot/bitters): Scaffold styles, variables and structure for Bourbon projects
|
118
|
-
- [Refills](https://github.com/thoughtbot/refills): Prepackaged patterns and components built with Bourbon, Neat and Bitters
|
180
|
+
## The Bourbon Family
|
119
181
|
|
120
|
-
|
182
|
+
Bourbon is part of a larger, modular family of Sass utilities:
|
183
|
+
|
184
|
+
- [Neat]: A lightweight and flexible Sass grid
|
185
|
+
- [Bitters]: Scaffold styles, variables and structure for Bourbon projects
|
186
|
+
|
187
|
+
[Neat]: https://github.com/thoughtbot/neat
|
188
|
+
[Bitters]: https://github.com/thoughtbot/bitters
|
189
|
+
|
190
|
+
## Contributing
|
191
|
+
|
192
|
+
See the [contributing] document. Thank you, [contributors]!
|
193
|
+
|
194
|
+
[contributing]: CONTRIBUTING.md
|
195
|
+
[contributors]: https://github.com/thoughtbot/bourbon/graphs/contributors
|
121
196
|
|
122
197
|
## License
|
123
198
|
|
124
|
-
|
125
|
-
|
126
|
-
|
199
|
+
Bourbon is copyright © 2011-2019 [thoughtbot, inc.][thoughtbot] It is free
|
200
|
+
software, and may be redistributed under the terms specified in the [license].
|
201
|
+
|
202
|
+
[license]: LICENSE.md
|
127
203
|
|
128
|
-
## About
|
204
|
+
## About
|
129
205
|
|
130
|
-
|
206
|
+
Bourbon is maintained by Tyson Gach and the thoughtbot design team. It is funded
|
207
|
+
by [thoughtbot, inc.][thoughtbot] and the names and logos for thoughtbot are
|
208
|
+
trademarks of thoughtbot, inc.
|
131
209
|
|
132
|
-
|
133
|
-
The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
210
|
+
[![thoughtbot][thoughtbot-logo]][thoughtbot]
|
134
211
|
|
135
|
-
We love open
|
136
|
-
See [our other projects][community] or
|
212
|
+
We love open-source software! See [our other projects][community] or
|
137
213
|
[hire us][hire] to design, develop, and grow your product.
|
138
214
|
|
139
|
-
[
|
140
|
-
[
|
215
|
+
[thoughtbot]: https://thoughtbot.com?utm_source=github
|
216
|
+
[thoughtbot-logo]: http://presskit.thoughtbot.com/images/thoughtbot-logo-for-readmes.svg
|
217
|
+
[community]: https://thoughtbot.com/community?utm_source=github
|
218
|
+
[hire]: https://thoughtbot.com/hire-us?utm_source=github
|
data/RELEASING.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Releasing
|
2
|
+
|
3
|
+
1. Update the version number in these places:
|
4
|
+
|
5
|
+
- `lib/bourbon/version.rb`
|
6
|
+
- `core/_bourbon.scss`
|
7
|
+
- `package.json`
|
8
|
+
|
9
|
+
1. Update `CHANGELOG.md`. We follow the guidelines from [Keep a CHANGELOG].
|
10
|
+
|
11
|
+
1. Commit changes. Use the convention “Bourbon vX.X.X” in your commit message.
|
12
|
+
There shouldn’t be code changes, and thus CI doesn’t need to run.
|
13
|
+
|
14
|
+
1. Run `bundle exec rake release`, which tags the release, pushes the tag to
|
15
|
+
GitHub, and pushes the gem to RubyGems.org.
|
16
|
+
|
17
|
+
1. Run `npm publish`, which pushes the new version to npm’s registry (if
|
18
|
+
releasing a pre-release, run `npm publish --tag beta`).
|
19
|
+
|
20
|
+
1. Draft a [new GitHub release][github-release]. Upon publishing, a tweet will
|
21
|
+
_automatically be sent_ on the [@bourbonsass] Twitter account via [Zapier].
|
22
|
+
It will look like this:
|
23
|
+
|
24
|
+
> We’ve released Bourbon {release_title}: {release_link}
|
25
|
+
|
26
|
+
1. Re-generate and publish the [documentation website], using the available
|
27
|
+
Rake tasks.
|
28
|
+
|
29
|
+
[Keep a CHANGELOG]: http://keepachangelog.com
|
30
|
+
[github-release]: https://github.com/thoughtbot/bourbon/releases/new
|
31
|
+
[documentation website]: https://github.com/thoughtbot/bourbon.io
|
32
|
+
[@bourbonsass]: https://twitter.com/bourbonsass
|
33
|
+
[Zapier]: https://zapier.com
|
data/Rakefile
CHANGED
data/bin/bourbon
CHANGED
data/bourbon.gemspec
CHANGED
@@ -2,31 +2,37 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
2
2
|
require "bourbon/version"
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
|
-
s.
|
6
|
-
s.
|
7
|
-
s.
|
8
|
-
s.
|
9
|
-
s.
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
|
5
|
+
s.add_development_dependency "aruba", "~> 0.14"
|
6
|
+
s.add_development_dependency "css_parser", "~> 1.4"
|
7
|
+
s.add_development_dependency "cucumber", "~> 2.0"
|
8
|
+
s.add_development_dependency "rake", "~> 11.1"
|
9
|
+
s.add_development_dependency "rspec", "~> 3.4"
|
10
|
+
s.add_runtime_dependency "thor", "~> 0.19"
|
11
|
+
s.authors = [
|
12
|
+
"Christian Reuter",
|
13
|
+
"Damian Galarza",
|
14
|
+
"Gabe Berke-Williams",
|
15
|
+
"Hugo Giraudel",
|
16
|
+
"Joshua Ogle",
|
17
|
+
"Kyle Fiedler",
|
18
|
+
"Phil LaPier",
|
19
|
+
"Reda Lemeden",
|
20
|
+
"Tyson Gach",
|
21
|
+
"Will McMahan"
|
22
|
+
]
|
13
23
|
s.description = <<-DESC
|
14
|
-
Bourbon is a library of pure Sass mixins that are designed to
|
15
|
-
|
16
|
-
meaning they should be as close to the original CSS syntax as possible.
|
24
|
+
Bourbon is a library of pure Sass mixins and functions that are designed to
|
25
|
+
make you a more efficient developer.
|
17
26
|
DESC
|
18
|
-
|
19
|
-
s.
|
20
|
-
s.
|
21
|
-
s.
|
27
|
+
s.email = "design+bourbon@thoughtbot.com"
|
28
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
29
|
+
s.files = `git ls-files`.split("\n")
|
30
|
+
s.homepage = "https://www.bourbon.io/"
|
31
|
+
s.license = "MIT"
|
32
|
+
s.name = "bourbon"
|
33
|
+
s.platform = Gem::Platform::RUBY
|
22
34
|
s.require_paths = ["lib"]
|
23
|
-
|
24
|
-
s.
|
25
|
-
s.
|
26
|
-
|
27
|
-
s.add_development_dependency("aruba", "~> 0.6.2")
|
28
|
-
s.add_development_dependency("css_parser", "~> 1.3")
|
29
|
-
s.add_development_dependency("rake", "~> 10.4")
|
30
|
-
s.add_development_dependency("rspec", "~> 3.3")
|
31
|
-
s.add_development_dependency("scss_lint", "~> 0.40")
|
35
|
+
s.summary = "A lightweight Sass tool set."
|
36
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
37
|
+
s.version = Bourbon::VERSION
|
32
38
|
end
|
data/core/_bourbon.scss
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
// Bourbon 6.0.0
|
2
|
+
// https://www.bourbon.io/
|
3
|
+
// Copyright 2011-2019 thoughtbot, inc.
|
4
|
+
// MIT License
|
5
|
+
|
6
|
+
@import "bourbon/helpers/buttons-list";
|
7
|
+
@import "bourbon/helpers/scales";
|
8
|
+
@import "bourbon/helpers/text-inputs-list";
|
9
|
+
|
10
|
+
@import "bourbon/settings/settings";
|
11
|
+
|
12
|
+
@import "bourbon/validators/contains";
|
13
|
+
@import "bourbon/validators/contains-falsy";
|
14
|
+
@import "bourbon/validators/is-color";
|
15
|
+
@import "bourbon/validators/is-length";
|
16
|
+
@import "bourbon/validators/is-number";
|
17
|
+
@import "bourbon/validators/is-size";
|
18
|
+
|
19
|
+
@import "bourbon/utilities/assign-inputs";
|
20
|
+
@import "bourbon/utilities/compact-shorthand";
|
21
|
+
@import "bourbon/utilities/directional-property";
|
22
|
+
@import "bourbon/utilities/fetch-bourbon-setting";
|
23
|
+
@import "bourbon/utilities/font-source-declaration";
|
24
|
+
@import "bourbon/utilities/gamma";
|
25
|
+
@import "bourbon/utilities/lightness";
|
26
|
+
@import "bourbon/utilities/contrast-ratio";
|
27
|
+
@import "bourbon/utilities/unpack-shorthand";
|
28
|
+
|
29
|
+
@import "bourbon/library/border-color";
|
30
|
+
@import "bourbon/library/border-radius";
|
31
|
+
@import "bourbon/library/border-style";
|
32
|
+
@import "bourbon/library/border-width";
|
33
|
+
@import "bourbon/library/buttons";
|
34
|
+
@import "bourbon/library/clearfix";
|
35
|
+
@import "bourbon/library/contrast-switch";
|
36
|
+
@import "bourbon/library/ellipsis";
|
37
|
+
@import "bourbon/library/font-face";
|
38
|
+
@import "bourbon/library/font-stacks";
|
39
|
+
@import "bourbon/library/hide-text";
|
40
|
+
@import "bourbon/library/hide-visually";
|
41
|
+
@import "bourbon/library/margin";
|
42
|
+
@import "bourbon/library/modular-scale";
|
43
|
+
@import "bourbon/library/overflow-wrap";
|
44
|
+
@import "bourbon/library/padding";
|
45
|
+
@import "bourbon/library/position";
|
46
|
+
@import "bourbon/library/prefixer";
|
47
|
+
@import "bourbon/library/shade";
|
48
|
+
@import "bourbon/library/size";
|
49
|
+
@import "bourbon/library/strip-unit";
|
50
|
+
@import "bourbon/library/text-inputs";
|
51
|
+
@import "bourbon/library/timing-functions";
|
52
|
+
@import "bourbon/library/tint";
|
53
|
+
@import "bourbon/library/triangle";
|
54
|
+
@import "bourbon/library/value-prefixer";
|
@@ -0,0 +1,27 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
////
|
4
|
+
/// Pre-defined scales for use with the `modular-scale` function.
|
5
|
+
///
|
6
|
+
/// @type number (unitless)
|
7
|
+
///
|
8
|
+
/// @see {function} modular-scale
|
9
|
+
////
|
10
|
+
|
11
|
+
$minor-second: 1.067;
|
12
|
+
$major-second: 1.125;
|
13
|
+
$minor-third: 1.2;
|
14
|
+
$major-third: 1.25;
|
15
|
+
$perfect-fourth: 1.333;
|
16
|
+
$augmented-fourth: 1.414;
|
17
|
+
$perfect-fifth: 1.5;
|
18
|
+
$minor-sixth: 1.6;
|
19
|
+
$golden: 1.618;
|
20
|
+
$major-sixth: 1.667;
|
21
|
+
$minor-seventh: 1.778;
|
22
|
+
$major-seventh: 1.875;
|
23
|
+
$octave: 2;
|
24
|
+
$major-tenth: 2.5;
|
25
|
+
$major-eleventh: 2.667;
|
26
|
+
$major-twelfth: 3;
|
27
|
+
$double-octave: 4;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// A list of all _text-based_ HTML inputs.
|
4
|
+
///
|
5
|
+
/// @type list
|
6
|
+
///
|
7
|
+
/// @access private
|
8
|
+
|
9
|
+
$_text-inputs-list: (
|
10
|
+
"[type='color']",
|
11
|
+
"[type='date']",
|
12
|
+
"[type='datetime']",
|
13
|
+
"[type='datetime-local']",
|
14
|
+
"[type='email']",
|
15
|
+
"[type='month']",
|
16
|
+
"[type='number']",
|
17
|
+
"[type='password']",
|
18
|
+
"[type='search']",
|
19
|
+
"[type='tel']",
|
20
|
+
"[type='text']",
|
21
|
+
"[type='time']",
|
22
|
+
"[type='url']",
|
23
|
+
"[type='week']",
|
24
|
+
"input:not([type])",
|
25
|
+
"textarea",
|
26
|
+
);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Provides a concise, one-line method for setting `border-color` on specific
|
4
|
+
/// edges of a box. Use a `null` value to “skip” edges of the box with standard
|
5
|
+
/// CSS shorthand.
|
6
|
+
///
|
7
|
+
/// @argument {list} $values
|
8
|
+
/// List of colors; accepts CSS shorthand.
|
9
|
+
///
|
10
|
+
/// @example scss
|
11
|
+
/// .element {
|
12
|
+
/// @include border-color(#a60b55 #76cd9c null #e8ae1a);
|
13
|
+
/// }
|
14
|
+
///
|
15
|
+
/// // CSS Output
|
16
|
+
/// .element {
|
17
|
+
/// border-left-color: #e8ae1a;
|
18
|
+
/// border-right-color: #76cd9c;
|
19
|
+
/// border-top-color: #a60b55;
|
20
|
+
/// }
|
21
|
+
///
|
22
|
+
/// @require {mixin} _directional-property
|
23
|
+
|
24
|
+
@mixin border-color($values) {
|
25
|
+
@include _directional-property(border, color, $values);
|
26
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Provides a concise, one-line method for setting `border-radius` on both the
|
4
|
+
/// top-left and top-right of a box.
|
5
|
+
///
|
6
|
+
/// @argument {number (with unit)} $radii
|
7
|
+
///
|
8
|
+
/// @example scss
|
9
|
+
/// .element {
|
10
|
+
/// @include border-top-radius(4px);
|
11
|
+
/// }
|
12
|
+
///
|
13
|
+
/// // CSS Output
|
14
|
+
/// .element {
|
15
|
+
/// border-top-left-radius: 4px;
|
16
|
+
/// border-top-right-radius: 4px;
|
17
|
+
/// }
|
18
|
+
|
19
|
+
@mixin border-top-radius($radii) {
|
20
|
+
border-top-left-radius: $radii;
|
21
|
+
border-top-right-radius: $radii;
|
22
|
+
}
|
23
|
+
|
24
|
+
/// Provides a concise, one-line method for setting `border-radius` on both the
|
25
|
+
/// top-right and bottom-right of a box.
|
26
|
+
///
|
27
|
+
/// @argument {number (with unit)} $radii
|
28
|
+
///
|
29
|
+
/// @example scss
|
30
|
+
/// .element {
|
31
|
+
/// @include border-right-radius(3px);
|
32
|
+
/// }
|
33
|
+
///
|
34
|
+
/// // CSS Output
|
35
|
+
/// .element {
|
36
|
+
/// border-bottom-right-radius: 3px;
|
37
|
+
/// border-top-right-radius: 3px;
|
38
|
+
/// }
|
39
|
+
|
40
|
+
@mixin border-right-radius($radii) {
|
41
|
+
border-bottom-right-radius: $radii;
|
42
|
+
border-top-right-radius: $radii;
|
43
|
+
}
|
44
|
+
|
45
|
+
/// Provides a concise, one-line method for setting `border-radius` on both the
|
46
|
+
/// bottom-left and bottom-right of a box.
|
47
|
+
///
|
48
|
+
/// @argument {number (with unit)} $radii
|
49
|
+
///
|
50
|
+
/// @example scss
|
51
|
+
/// .element {
|
52
|
+
/// @include border-bottom-radius(2px);
|
53
|
+
/// }
|
54
|
+
///
|
55
|
+
/// // CSS Output
|
56
|
+
/// .element {
|
57
|
+
/// border-bottom-left-radius: 2px;
|
58
|
+
/// border-bottom-right-radius: 2px;
|
59
|
+
/// }
|
60
|
+
|
61
|
+
@mixin border-bottom-radius($radii) {
|
62
|
+
border-bottom-left-radius: $radii;
|
63
|
+
border-bottom-right-radius: $radii;
|
64
|
+
}
|
65
|
+
|
66
|
+
/// Provides a concise, one-line method for setting `border-radius` on both the
|
67
|
+
/// top-left and bottom-left of a box.
|
68
|
+
///
|
69
|
+
/// @argument {number (with unit)} $radii
|
70
|
+
///
|
71
|
+
/// @example scss
|
72
|
+
/// .element {
|
73
|
+
/// @include border-left-radius(1px);
|
74
|
+
/// }
|
75
|
+
///
|
76
|
+
/// // CSS Output
|
77
|
+
/// .element {
|
78
|
+
/// border-bottom-left-radius: 1px;
|
79
|
+
/// border-top-left-radius: 1px;
|
80
|
+
/// }
|
81
|
+
|
82
|
+
@mixin border-left-radius($radii) {
|
83
|
+
border-bottom-left-radius: $radii;
|
84
|
+
border-top-left-radius: $radii;
|
85
|
+
}
|