semantic-ui-sass 2.4.2.0 → 2.4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +4 -2
  3. data/CHANGELOG.md +108 -105
  4. data/README.md +48 -2
  5. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +2 -2
  6. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +21 -21
  7. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +3 -3
  8. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +2 -2
  9. data/app/assets/stylesheets/semantic-ui/elements/_all.scss +1 -0
  10. data/app/assets/stylesheets/semantic-ui/elements/_container.scss +29 -30
  11. data/app/assets/stylesheets/semantic-ui/elements/_container_variables.scss +48 -0
  12. data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +2 -2
  13. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +2 -2
  14. data/app/assets/stylesheets/semantic-ui/globals/_variables.scss +45 -2
  15. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +12 -12
  16. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +30 -30
  17. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +1 -1
  18. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +1 -1
  19. data/app/assets/stylesheets/semantic-ui/views/_ad.scss +1 -1
  20. data/app/assets/stylesheets/semantic-ui/views/_card.scss +3 -3
  21. data/app/assets/stylesheets/semantic-ui/views/_item.scss +3 -3
  22. data/lib/semantic-ui-sass.rb +2 -2
  23. data/lib/semantic/ui/sass/version.rb +2 -2
  24. data/semantic-ui-sass.gemspec +2 -2
  25. data/spec/dummy/app/assets/config/manifest.js +3 -0
  26. data/tasks/converter.rb +17 -1
  27. metadata +15 -13
data/README.md CHANGED
@@ -59,16 +59,36 @@ $use-custom-scrollbars: false;
59
59
  ```
60
60
 
61
61
  ## All variables, you can custom any of that
62
+
63
+ Fonts:
64
+
62
65
  ```css
63
- $import-google-fonts: true !default;
64
- $font-url: 'https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin,latin-ext' !default;
65
66
  $font-name: 'Lato' !default;
66
67
  $font-family: $font-name, 'Helvetica Neue', Arial, Helvetica, sans-serif !default;
68
+ $font-url: 'https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin,latin-ext' !default;
69
+ $import-google-fonts: true !default;
70
+ ```
71
+
72
+ Scrollbars:
73
+
74
+ ```css
67
75
  $use-custom-scrollbars: true !default;
68
76
  ```
69
77
 
78
+ Breakpoints:
79
+
80
+ ```css
81
+ $mobile-breakpoint: 320px !default;
82
+ $tablet-breakpoint: 768px !default;
83
+ $computer-breakpoint: 992px !default;
84
+ $large-monitor-breakpoint: 1200px !default;
85
+ $widescreen-monitor-breakpoint: 1920px !default;
86
+ ```
87
+
70
88
  ## Javascripts
71
89
 
90
+ ### Ruby on Rails Version 5
91
+
72
92
  We have a helper that includes all Semantic javascripts. Put this in your Javascript manifest (usually in `application.js`) to
73
93
 
74
94
  ```js
@@ -83,6 +103,32 @@ You can also load individual modules, provided you also require any dependencies
83
103
  //= require semantic-ui/dropdown
84
104
  ```
85
105
 
106
+ ### Ruby on Rails Version 6+
107
+
108
+ Add packages with yarn:
109
+
110
+ ```console
111
+ yarn add jquery popper.js semantic-ui-sass
112
+ ```
113
+
114
+ In config/webpack/environment.js add the following:
115
+
116
+ ```js
117
+ const webpack = require("webpack")
118
+
119
+ environment.plugins.append("Provide", new webpack.ProvidePlugin({
120
+ $: 'jquery',
121
+ jQuery: 'jquery',
122
+ Popper: ['popper.js', 'default']
123
+ }))
124
+ ````
125
+
126
+ In app/javascript/packs/application.js add the following:
127
+
128
+ ```js
129
+ require("semantic-ui-sass")
130
+ ````
131
+
86
132
  # semantic-ui-sass with Compass
87
133
 
88
134
  ## New project
@@ -835,7 +835,7 @@
835
835
  }
836
836
 
837
837
  /* Swap to full width on mobile */
838
- @media only screen and (max-width: 767px) {
838
+ @media only screen and (max-width: $largest-mobile-screen) {
839
839
  .ui.form .fields {
840
840
  -ms-flex-wrap: wrap;
841
841
  flex-wrap: wrap;
@@ -921,7 +921,7 @@
921
921
  }
922
922
 
923
923
  /* Swap to full width on mobile */
924
- @media only screen and (max-width: 767px) {
924
+ @media only screen and (max-width: $largest-mobile-screen) {
925
925
  .ui.form:not(.unstackable) .two.fields:not(.unstackable) > .fields,
926
926
  .ui.form:not(.unstackable) .two.fields:not(.unstackable) > .field,
927
927
  .ui.form:not(.unstackable) .three.fields:not(.unstackable) > .fields,
@@ -171,7 +171,7 @@
171
171
  Page Grid
172
172
  -------------------------*/
173
173
 
174
- @media only screen and (max-width: 767px) {
174
+ @media only screen and (max-width: $largest-mobile-screen) {
175
175
  .ui.page.grid {
176
176
  width: auto;
177
177
  padding-left: 0em;
@@ -180,7 +180,7 @@
180
180
  margin-right: 0em;
181
181
  }
182
182
  }
183
- @media only screen and (min-width: 768px) and (max-width: 991px) {
183
+ @media only screen and (min-width: $tablet-breakpoint) and (max-width: $largest-tablet-screen) {
184
184
  .ui.page.grid {
185
185
  width: auto;
186
186
  margin-left: 0em;
@@ -189,7 +189,7 @@
189
189
  padding-right: 2em;
190
190
  }
191
191
  }
192
- @media only screen and (min-width: 992px) and (max-width: 1199px) {
192
+ @media only screen and (min-width: $computer-breakpoint) and (max-width: $largest-small-monitor) {
193
193
  .ui.page.grid {
194
194
  width: auto;
195
195
  margin-left: 0em;
@@ -198,7 +198,7 @@
198
198
  padding-right: 3%;
199
199
  }
200
200
  }
201
- @media only screen and (min-width: 1200px) and (max-width: 1919px) {
201
+ @media only screen and (min-width: $large-monitor-breakpoint) and (max-width: $largest-large-monitor) {
202
202
  .ui.page.grid {
203
203
  width: auto;
204
204
  margin-left: 0em;
@@ -207,7 +207,7 @@
207
207
  padding-right: 15%;
208
208
  }
209
209
  }
210
- @media only screen and (min-width: 1920px) {
210
+ @media only screen and (min-width: $widescreen-monitor-breakpoint) {
211
211
  .ui.page.grid {
212
212
  width: auto;
213
213
  margin-left: 0em;
@@ -459,7 +459,7 @@
459
459
 
460
460
 
461
461
  /* Mobile Sizing Combinations */
462
- @media only screen and (min-width: 320px) and (max-width: 767px) {
462
+ @media only screen and (min-width: $mobile-breakpoint) and (max-width: $largest-mobile-screen) {
463
463
  .ui.grid > .row > [class*="one wide mobile"].column,
464
464
  .ui.grid > .column.row > [class*="one wide mobile"].column,
465
465
  .ui.grid > [class*="one wide mobile"].column,
@@ -559,7 +559,7 @@
559
559
  }
560
560
 
561
561
  /* Tablet Sizing Combinations */
562
- @media only screen and (min-width: 768px) and (max-width: 991px) {
562
+ @media only screen and (min-width: $tablet-breakpoint) and (max-width: $largest-tablet-screen) {
563
563
  .ui.grid > .row > [class*="one wide tablet"].column,
564
564
  .ui.grid > .column.row > [class*="one wide tablet"].column,
565
565
  .ui.grid > [class*="one wide tablet"].column,
@@ -659,7 +659,7 @@
659
659
  }
660
660
 
661
661
  /* Computer/Desktop Sizing Combinations */
662
- @media only screen and (min-width: 992px) {
662
+ @media only screen and (min-width: $computer-breakpoint) {
663
663
  .ui.grid > .row > [class*="one wide computer"].column,
664
664
  .ui.grid > .column.row > [class*="one wide computer"].column,
665
665
  .ui.grid > [class*="one wide computer"].column,
@@ -759,7 +759,7 @@
759
759
  }
760
760
 
761
761
  /* Large Monitor Sizing Combinations */
762
- @media only screen and (min-width: 1200px) and (max-width: 1919px) {
762
+ @media only screen and (min-width: $large-monitor-breakpoint) and (max-width: $largest-large-monitor) {
763
763
  .ui.grid > .row > [class*="one wide large screen"].column,
764
764
  .ui.grid > .column.row > [class*="one wide large screen"].column,
765
765
  .ui.grid > [class*="one wide large screen"].column,
@@ -859,7 +859,7 @@
859
859
  }
860
860
 
861
861
  /* Widescreen Sizing Combinations */
862
- @media only screen and (min-width: 1920px) {
862
+ @media only screen and (min-width: $widescreen-monitor-breakpoint) {
863
863
  .ui.grid > .row > [class*="one wide widescreen"].column,
864
864
  .ui.grid > .column.row > [class*="one wide widescreen"].column,
865
865
  .ui.grid > [class*="one wide widescreen"].column,
@@ -1478,7 +1478,7 @@
1478
1478
 
1479
1479
 
1480
1480
  /* Mobile */
1481
- @media only screen and (max-width: 767px) {
1481
+ @media only screen and (max-width: $largest-mobile-screen) {
1482
1482
  .ui[class*="mobile reversed"].grid,
1483
1483
  .ui[class*="mobile reversed"].grid > .row,
1484
1484
  .ui.grid > [class*="mobile reversed"].row {
@@ -1529,7 +1529,7 @@
1529
1529
  }
1530
1530
 
1531
1531
  /* Tablet */
1532
- @media only screen and (min-width: 768px) and (max-width: 991px) {
1532
+ @media only screen and (min-width: $tablet-breakpoint) and (max-width: $largest-tablet-screen) {
1533
1533
  .ui[class*="tablet reversed"].grid,
1534
1534
  .ui[class*="tablet reversed"].grid > .row,
1535
1535
  .ui.grid > [class*="tablet reversed"].row {
@@ -1579,7 +1579,7 @@
1579
1579
  }
1580
1580
 
1581
1581
  /* Computer */
1582
- @media only screen and (min-width: 992px) {
1582
+ @media only screen and (min-width: $computer-breakpoint) {
1583
1583
  .ui[class*="computer reversed"].grid,
1584
1584
  .ui[class*="computer reversed"].grid > .row,
1585
1585
  .ui.grid > [class*="computer reversed"].row {
@@ -1634,7 +1634,7 @@
1634
1634
 
1635
1635
 
1636
1636
  /* Tablet Only */
1637
- @media only screen and (min-width: 768px) and (max-width: 991px) {
1637
+ @media only screen and (min-width: $tablet-breakpoint) and (max-width: $largest-tablet-screen) {
1638
1638
  .ui.doubling.grid {
1639
1639
  width: auto;
1640
1640
  }
@@ -1730,7 +1730,7 @@
1730
1730
  }
1731
1731
 
1732
1732
  /* Mobile Only */
1733
- @media only screen and (max-width: 767px) {
1733
+ @media only screen and (max-width: $largest-mobile-screen) {
1734
1734
  .ui.grid > .doubling.row,
1735
1735
  .ui.doubling.grid > .row {
1736
1736
  margin: 0em !important;
@@ -1825,7 +1825,7 @@
1825
1825
  Stackable
1826
1826
  --------------------*/
1827
1827
 
1828
- @media only screen and (max-width: 767px) {
1828
+ @media only screen and (max-width: $largest-mobile-screen) {
1829
1829
  .ui.stackable.grid {
1830
1830
  width: auto;
1831
1831
  margin-left: 0em !important;
@@ -1905,7 +1905,7 @@
1905
1905
  /* These include arbitrary class repetitions for forced specificity */
1906
1906
 
1907
1907
  /* Mobile Only Hide */
1908
- @media only screen and (max-width: 767px) {
1908
+ @media only screen and (max-width: $largest-mobile-screen) {
1909
1909
  .ui[class*="tablet only"].grid.grid.grid:not(.mobile),
1910
1910
  .ui.grid.grid.grid > [class*="tablet only"].row:not(.mobile),
1911
1911
  .ui.grid.grid.grid > [class*="tablet only"].column:not(.mobile),
@@ -1933,7 +1933,7 @@
1933
1933
  }
1934
1934
 
1935
1935
  /* Tablet Only Hide */
1936
- @media only screen and (min-width: 768px) and (max-width: 991px) {
1936
+ @media only screen and (min-width: $tablet-breakpoint) and (max-width: $largest-tablet-screen) {
1937
1937
  .ui[class*="mobile only"].grid.grid.grid:not(.tablet),
1938
1938
  .ui.grid.grid.grid > [class*="mobile only"].row:not(.tablet),
1939
1939
  .ui.grid.grid.grid > [class*="mobile only"].column:not(.tablet),
@@ -1961,7 +1961,7 @@
1961
1961
  }
1962
1962
 
1963
1963
  /* Computer Only Hide */
1964
- @media only screen and (min-width: 992px) and (max-width: 1199px) {
1964
+ @media only screen and (min-width: $computer-breakpoint) and (max-width: $largest-small-monitor) {
1965
1965
  .ui[class*="mobile only"].grid.grid.grid:not(.computer),
1966
1966
  .ui.grid.grid.grid > [class*="mobile only"].row:not(.computer),
1967
1967
  .ui.grid.grid.grid > [class*="mobile only"].column:not(.computer),
@@ -1989,7 +1989,7 @@
1989
1989
  }
1990
1990
 
1991
1991
  /* Large Screen Only Hide */
1992
- @media only screen and (min-width: 1200px) and (max-width: 1919px) {
1992
+ @media only screen and (min-width: $large-monitor-breakpoint) and (max-width: $largest-large-monitor) {
1993
1993
  .ui[class*="mobile only"].grid.grid.grid:not(.computer),
1994
1994
  .ui.grid.grid.grid > [class*="mobile only"].row:not(.computer),
1995
1995
  .ui.grid.grid.grid > [class*="mobile only"].column:not(.computer),
@@ -2011,7 +2011,7 @@
2011
2011
  }
2012
2012
 
2013
2013
  /* Widescreen Only Hide */
2014
- @media only screen and (min-width: 1920px) {
2014
+ @media only screen and (min-width: $widescreen-monitor-breakpoint) {
2015
2015
  .ui[class*="mobile only"].grid.grid.grid:not(.computer),
2016
2016
  .ui.grid.grid.grid > [class*="mobile only"].row:not(.computer),
2017
2017
  .ui.grid.grid.grid > [class*="mobile only"].column:not(.computer),
@@ -393,14 +393,14 @@
393
393
  Container
394
394
  ---------------*/
395
395
 
396
- @media only screen and (max-width: 767px) {
396
+ @media only screen and (max-width: $largest-mobile-screen) {
397
397
  .ui.menu > .ui.container {
398
398
  width: 100% !important;
399
399
  margin-left: 0em !important;
400
400
  margin-right: 0em !important;
401
401
  }
402
402
  }
403
- @media only screen and (min-width: 768px) {
403
+ @media only screen and (min-width: $tablet-breakpoint) {
404
404
  .ui.menu:not(.secondary):not(.text):not(.tabular):not(.borderless) > .container > .item:not(.right):not(.borderless):first-child {
405
405
  border-left: 1px solid rgba(34, 36, 38, 0.1);
406
406
  }
@@ -1273,7 +1273,7 @@ Floated Menu / Item
1273
1273
  Stackable
1274
1274
  ---------------*/
1275
1275
 
1276
- @media only screen and (max-width: 767px) {
1276
+ @media only screen and (max-width: $largest-mobile-screen) {
1277
1277
  .ui.stackable.menu {
1278
1278
  -webkit-box-orient: vertical;
1279
1279
  -webkit-box-direction: normal;
@@ -148,7 +148,7 @@
148
148
  }
149
149
 
150
150
  /* Responsive */
151
- @media only screen and (max-width: 767px) {
151
+ @media only screen and (max-width: $largest-mobile-screen) {
152
152
  .ui.table:not(.unstackable) {
153
153
  width: 100%;
154
154
  }
@@ -399,7 +399,7 @@
399
399
  Stackable
400
400
  ---------------*/
401
401
 
402
- @media only screen and (max-width: 991px) {
402
+ @media only screen and (max-width: $largest-tablet-screen) {
403
403
  .ui[class*="tablet stackable"].table,
404
404
  .ui[class*="tablet stackable"].table tbody,
405
405
  .ui[class*="tablet stackable"].table tr,
@@ -1,4 +1,5 @@
1
1
  @import 'button';
2
+ @import 'container_variables';
2
3
  @import 'container';
3
4
  @import 'divider';
4
5
  @import 'flag';
@@ -17,78 +17,78 @@
17
17
  /* All Sizes */
18
18
  .ui.container {
19
19
  display: block;
20
- max-width: 100% !important;
20
+ max-width: $max-width !important;
21
21
  }
22
22
 
23
23
  /* Mobile */
24
- @media only screen and (max-width: 767px) {
24
+ @media only screen and (max-width: $largest-mobile-screen) {
25
25
  .ui.container {
26
- width: auto !important;
27
- margin-left: 1em !important;
28
- margin-right: 1em !important;
26
+ width: $mobile-width !important;
27
+ margin-left: $mobile-gutter !important;
28
+ margin-right: $mobile-gutter !important;
29
29
  }
30
30
  .ui.grid.container {
31
- width: auto !important;
31
+ width: $mobile-grid-width !important;
32
32
  }
33
33
  .ui.relaxed.grid.container {
34
- width: auto !important;
34
+ width: $mobile-relaxed-grid-width !important;
35
35
  }
36
36
  .ui.very.relaxed.grid.container {
37
- width: auto !important;
37
+ width: $mobile-very-relaxed-grid-width !important;
38
38
  }
39
39
  }
40
40
 
41
41
  /* Tablet */
42
- @media only screen and (min-width: 768px) and (max-width: 991px) {
42
+ @media only screen and (min-width: $tablet-breakpoint) and (max-width: $largest-tablet-screen) {
43
43
  .ui.container {
44
- width: 723px;
45
- margin-left: auto !important;
46
- margin-right: auto !important;
44
+ width: $tablet-width;
45
+ margin-left: $tablet-gutter !important;
46
+ margin-right: $tablet-gutter !important;
47
47
  }
48
48
  .ui.grid.container {
49
- width: calc( 723px + 2rem ) !important;
49
+ width: $tablet-grid-width !important;
50
50
  }
51
51
  .ui.relaxed.grid.container {
52
- width: calc( 723px + 3rem ) !important;
52
+ width: $tablet-relaxed-grid-width !important;
53
53
  }
54
54
  .ui.very.relaxed.grid.container {
55
- width: calc( 723px + 5rem ) !important;
55
+ width: $tablet-very-relaxed-grid-width !important;
56
56
  }
57
57
  }
58
58
 
59
59
  /* Small Monitor */
60
- @media only screen and (min-width: 992px) and (max-width: 1199px) {
60
+ @media only screen and (min-width: $computer-breakpoint) and (max-width: $largest-small-monitor) {
61
61
  .ui.container {
62
- width: 933px;
63
- margin-left: auto !important;
64
- margin-right: auto !important;
62
+ width: $computer-width;
63
+ margin-left: $computer-gutter !important;
64
+ margin-right: $computer-gutter !important;
65
65
  }
66
66
  .ui.grid.container {
67
- width: calc( 933px + 2rem ) !important;
67
+ width: $computer-grid-width !important;
68
68
  }
69
69
  .ui.relaxed.grid.container {
70
- width: calc( 933px + 3rem ) !important;
70
+ width: $computer-relaxed-grid-width !important;
71
71
  }
72
72
  .ui.very.relaxed.grid.container {
73
- width: calc( 933px + 5rem ) !important;
73
+ width: $computer-very-relaxed-grid-width !important;
74
74
  }
75
75
  }
76
76
 
77
77
  /* Large Monitor */
78
- @media only screen and (min-width: 1200px) {
78
+ @media only screen and (min-width: $large-monitor-breakpoint) {
79
79
  .ui.container {
80
- width: 1127px;
81
- margin-left: auto !important;
82
- margin-right: auto !important;
80
+ width: $large-monitor-width;
81
+ margin-left: $large-monitor-gutter !important;
82
+ margin-right: $large-monitor-gutter !important;
83
83
  }
84
84
  .ui.grid.container {
85
- width: calc( 1127px + 2rem ) !important;
85
+ width: $large-monitor-grid-width !important;
86
86
  }
87
87
  .ui.relaxed.grid.container {
88
- width: calc( 1127px + 3rem ) !important;
88
+ width: $large-monitor-relaxed-grid-width !important;
89
89
  }
90
90
  .ui.very.relaxed.grid.container {
91
- width: calc( 1127px + 5rem ) !important;
91
+ width: $large-monitor-very-relaxed-grid-width !important;
92
92
  }
93
93
  }
94
94
 
@@ -144,4 +144,3 @@
144
144
  /*******************************
145
145
  Site Overrides
146
146
  *******************************/
147
-
@@ -0,0 +1,48 @@
1
+ /*******************************
2
+ Container
3
+ *******************************/
4
+
5
+ /*-------------------
6
+ Element
7
+ --------------------*/
8
+
9
+ /* Minimum Gutter is used to determine the maximum container width for a given device */
10
+
11
+ $max-width: 100%;
12
+
13
+ /* Devices */
14
+ $mobile-minimum-gutter: 0em;
15
+ $mobile-width: auto;
16
+ $mobile-gutter: 1em;
17
+
18
+ $tablet-minimum-gutter: ($em-size * 1);
19
+ $tablet-width: $tablet-breakpoint - ($tablet-minimum-gutter * 2) - $scrollbar-width;
20
+ $tablet-gutter: auto;
21
+
22
+ $computer-minimum-gutter: ($em-size * 1.5);
23
+ $computer-width: $computer-breakpoint - ($computer-minimum-gutter * 2) - $scrollbar-width;
24
+ $computer-gutter: auto;
25
+
26
+ $large-monitor-minimum-gutter: ($em-size * 2);
27
+ $large-monitor-width: $large-monitor-breakpoint - ($large-monitor-minimum-gutter * 2) - $scrollbar-width;
28
+ $large-monitor-gutter: auto;
29
+
30
+ /* Coupling (Add Negative Margin to container size) */
31
+ $grid-gutter-width: 2rem;
32
+ $relaxed-grid-gutter-width: 3rem;
33
+ $very-relaxed-grid-gutter-width: 5rem;
34
+
35
+ $mobile-grid-width: $mobile-width;
36
+ $tablet-grid-width: calc($tablet-width + $grid-gutter-width);
37
+ $computer-grid-width: calc($computer-width + $grid-gutter-width);
38
+ $large-monitor-grid-width: calc($large-monitor-width + $grid-gutter-width);
39
+
40
+ $mobile-relaxed-grid-width: $mobile-width;
41
+ $tablet-relaxed-grid-width: calc($tablet-width + $relaxed-grid-gutter-width);
42
+ $computer-relaxed-grid-width: calc($computer-width + $relaxed-grid-gutter-width);
43
+ $large-monitor-relaxed-grid-width: calc($large-monitor-width + $relaxed-grid-gutter-width);
44
+
45
+ $mobile-very-relaxed-grid-width: $mobile-width;
46
+ $tablet-very-relaxed-grid-width: calc($tablet-width + $very-relaxed-grid-gutter-width);
47
+ $computer-very-relaxed-grid-width: calc($computer-width + $very-relaxed-grid-gutter-width);
48
+ $large-monitor-very-relaxed-grid-width: calc($large-monitor-width + $very-relaxed-grid-gutter-width);