titon-toolkit 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/changelog.md +66 -183
- data/readme.md +17 -8
- data/roadmap.md +13 -11
- data/scss/toolkit.scss +3 -2
- data/scss/toolkit/_common.scss +72 -22
- data/scss/toolkit/base.scss +12 -1
- data/scss/toolkit/components/accordion.scss +19 -17
- data/scss/toolkit/components/blackout.scss +20 -18
- data/scss/toolkit/components/breadcrumb.scss +37 -36
- data/scss/toolkit/components/button-group.scss +130 -128
- data/scss/toolkit/components/button.scss +100 -98
- data/scss/toolkit/components/carousel.scss +63 -63
- data/scss/toolkit/components/code.scss +49 -47
- data/scss/toolkit/components/divider.scss +34 -32
- data/scss/toolkit/components/drop.scss +82 -79
- data/scss/toolkit/components/flex.scss +110 -0
- data/scss/toolkit/components/flyout.scss +59 -53
- data/scss/toolkit/components/form.scss +178 -170
- data/scss/toolkit/components/grid.scss +36 -34
- data/scss/toolkit/components/icon.scss +28 -25
- data/scss/toolkit/components/input-group.scss +35 -33
- data/scss/toolkit/components/input.scss +102 -99
- data/scss/toolkit/components/label.scss +99 -97
- data/scss/toolkit/components/lazy-load.scss +6 -4
- data/scss/toolkit/components/loader.scss +124 -122
- data/scss/toolkit/components/mask.scss +24 -22
- data/scss/toolkit/components/matrix.scss +16 -14
- data/scss/toolkit/components/modal.scss +104 -102
- data/scss/toolkit/components/notice.scss +24 -23
- data/scss/toolkit/components/off-canvas.scss +118 -116
- data/scss/toolkit/components/pagination.scss +90 -66
- data/scss/toolkit/components/pin.scss +11 -9
- data/scss/toolkit/components/popover.scss +50 -48
- data/scss/toolkit/components/progress.scss +42 -40
- data/scss/toolkit/components/responsive.scss +61 -66
- data/scss/toolkit/components/showcase.scss +62 -60
- data/scss/toolkit/components/step.scss +51 -44
- data/scss/toolkit/components/switch.scss +96 -93
- data/scss/toolkit/components/tab.scss +25 -25
- data/scss/toolkit/components/table.scss +76 -75
- data/scss/toolkit/components/toast.scss +91 -89
- data/scss/toolkit/components/tooltip.scss +82 -80
- data/scss/toolkit/components/type-ahead.scss +53 -52
- data/scss/toolkit/components/typography.scss +45 -43
- data/scss/toolkit/mixins/_flex.scss +80 -0
- data/scss/toolkit/mixins/_grid.scss +6 -29
- data/scss/toolkit/mixins/_helper.scss +33 -4
- data/scss/toolkit/mixins/_layout.scss +28 -1
- data/version.md +1 -1
- metadata +4 -2
@@ -6,55 +6,57 @@
|
|
6
6
|
|
7
7
|
@import "../common";
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
h1 { font-size: $h1-size; }
|
15
|
-
h2 { font-size: $h2-size; }
|
16
|
-
h3 { font-size: $h3-size; }
|
17
|
-
h4 { font-size: $h4-size; }
|
18
|
-
h5 { font-size: $h5-size; }
|
19
|
-
h6 { font-size: $h6-size; }
|
20
|
-
|
21
|
-
h1, h2, h3, h4, h5, h6 {
|
22
|
-
margin: 0;
|
23
|
-
padding: 0;
|
24
|
-
line-height: $base-line-height;
|
25
|
-
font-weight: normal;
|
26
|
-
}
|
9
|
+
@include export("typography") {
|
10
|
+
html {
|
11
|
+
font-size: $base-size;
|
12
|
+
line-height: $base-line-height;
|
13
|
+
}
|
27
14
|
|
28
|
-
|
29
|
-
|
15
|
+
h1 { font-size: $h1-size; }
|
16
|
+
h2 { font-size: $h2-size; }
|
17
|
+
h3 { font-size: $h3-size; }
|
18
|
+
h4 { font-size: $h4-size; }
|
19
|
+
h5 { font-size: $h5-size; }
|
20
|
+
h6 { font-size: $h6-size; }
|
30
21
|
|
31
|
-
|
22
|
+
h1, h2, h3, h4, h5, h6 {
|
32
23
|
margin: 0;
|
24
|
+
padding: 0;
|
25
|
+
line-height: $base-line-height;
|
26
|
+
font-weight: normal;
|
33
27
|
}
|
34
|
-
}
|
35
28
|
|
36
|
-
|
37
|
-
|
38
|
-
}
|
29
|
+
p, ul, ol {
|
30
|
+
margin: $margin 0 0 0;
|
39
31
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
32
|
+
ul, ol {
|
33
|
+
margin: 0;
|
34
|
+
}
|
35
|
+
}
|
44
36
|
|
45
|
-
|
46
|
-
|
47
|
-
}
|
37
|
+
hr {
|
38
|
+
margin: $margin 0;
|
39
|
+
}
|
48
40
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
}
|
41
|
+
blockquote {
|
42
|
+
margin: $margin;
|
43
|
+
padding: 0 $padding;
|
44
|
+
border-#{$align-direction}: 5px solid $gray;
|
45
|
+
|
46
|
+
cite { display: block; font-size: $small-size; }
|
47
|
+
cite::before { content: "\2014 \00A0"; /* em dash */ }
|
48
|
+
}
|
55
49
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
50
|
+
mark {
|
51
|
+
display: inline-block;
|
52
|
+
background: $gray-dark;
|
53
|
+
border-radius: $round;
|
54
|
+
padding: 0 .3em;
|
55
|
+
}
|
56
|
+
|
57
|
+
.text-muted { color: $default; }
|
58
|
+
.text-info { color: darken($info, 15%); }
|
59
|
+
.text-error { color: darken($error, 15%); }
|
60
|
+
.text-warning { color: darken($warning, 15%); }
|
61
|
+
.text-success { color: darken($success, 15%); }
|
62
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
@import "layout";
|
2
|
+
@import "helper";
|
3
|
+
|
4
|
+
$flex-align-map: (
|
5
|
+
top: flex-start,
|
6
|
+
bottom: flex-end,
|
7
|
+
left: flex-start,
|
8
|
+
right: flex-end,
|
9
|
+
center: center,
|
10
|
+
between: space-between,
|
11
|
+
around: space-around,
|
12
|
+
stretch: stretch,
|
13
|
+
baseline: baseline
|
14
|
+
);
|
15
|
+
|
16
|
+
// justify-content - Align blocks/lines on main axis.
|
17
|
+
// align-content - Align blocks/lines on cross axis. This is the opposite of justify-content.
|
18
|
+
// align-items - Align blocks within a line on the cross axis when each block has a variable height.
|
19
|
+
|
20
|
+
// Calculate the width of an individual flex block.
|
21
|
+
// Take into account max widths and gutters.
|
22
|
+
@function flex-span($n, $columns, $width: $flex-width, $gutter: $flex-gutter) {
|
23
|
+
@return span-width($n, $columns, $width, $gutter);
|
24
|
+
}
|
25
|
+
|
26
|
+
// Styles for the region that contains blocks.
|
27
|
+
@mixin flex-region($width: $flex-width) {
|
28
|
+
display: flex;
|
29
|
+
max-width: $width;
|
30
|
+
}
|
31
|
+
|
32
|
+
// Align the blocks within a region horizontally or vertically.
|
33
|
+
@mixin flex-region-align($align: left) {
|
34
|
+
justify-content: map-get($flex-align-map, $align);
|
35
|
+
}
|
36
|
+
|
37
|
+
// Set the orientation of blocks. Either display vertically or horizontally.
|
38
|
+
@mixin flex-region-orientation($orientation: horizontal) {
|
39
|
+
@if $orientation == vertical {
|
40
|
+
flex-direction: column;
|
41
|
+
} @else {
|
42
|
+
flex-direction: row;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
// Set the wrapping of blocks within a region.
|
47
|
+
@mixin flex-region-wrap($wrap: true) {
|
48
|
+
@if $wrap {
|
49
|
+
flex-wrap: wrap;
|
50
|
+
align-items: flex-start;
|
51
|
+
} @else {
|
52
|
+
flex-wrap: nowrap;
|
53
|
+
align-items: stretch;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
// Set the width, grow, and shrink settings for a block.
|
58
|
+
@mixin flex-block($width: auto, $grow: 1, $shrink: 0) {
|
59
|
+
flex: $grow $shrink $width;
|
60
|
+
}
|
61
|
+
|
62
|
+
// Override the blocks alignment set by the parent.
|
63
|
+
@mixin flex-block-align($align: left) {
|
64
|
+
align-self: map-get($flex-align-map, $align);
|
65
|
+
}
|
66
|
+
|
67
|
+
// Set the order of a block. Defaults to 100 so that custom blocks can be set higher.
|
68
|
+
@mixin flex-block-order($order: 100) {
|
69
|
+
order: $order;
|
70
|
+
}
|
71
|
+
|
72
|
+
// Set a block to grow by default.
|
73
|
+
@mixin flex-block-grow($width: auto) {
|
74
|
+
@include flex-block($width);
|
75
|
+
}
|
76
|
+
|
77
|
+
// Set a block to shrink by default.
|
78
|
+
@mixin flex-block-shrink($width: auto) {
|
79
|
+
@include flex-block($width, 0, 1);
|
80
|
+
}
|
@@ -1,33 +1,10 @@
|
|
1
|
-
|
2
1
|
@import "layout";
|
3
|
-
|
4
|
-
// Calculate the gutter spacing as a percentage.
|
5
|
-
// Use the max width of the grid to calculate against.
|
6
|
-
@function grid-gutter($width, $gutter) {
|
7
|
-
@return if($gutter, ((to-pixel($gutter) / to-pixel($width)) * 100 * 1%), 0%);
|
8
|
-
}
|
2
|
+
@import "helper";
|
9
3
|
|
10
4
|
// Calculate the width of an individual grid column.
|
11
5
|
// Take into account max widths and gutters.
|
12
6
|
@function grid-span($n, $columns, $width: $grid-width, $gutter: $grid-gutter) {
|
13
|
-
|
14
|
-
$gutter-width: 0%;
|
15
|
-
|
16
|
-
// If a gutter is set, remove width based on the sum of the gutter columns
|
17
|
-
@if $gutter {
|
18
|
-
$gutter-width: grid-gutter($width, $gutter);
|
19
|
-
$row-width: $row-width - ($gutter-width * ($columns - 1));
|
20
|
-
}
|
21
|
-
|
22
|
-
// The column width should span a division of the total width
|
23
|
-
$span-width: ($row-width / $columns) * $n;
|
24
|
-
|
25
|
-
// If a gutter is set, increase the column width to fill in the missing gaps
|
26
|
-
@if $gutter and $n > 1 {
|
27
|
-
$span-width: $span-width + (($n - 1) * $gutter-width);
|
28
|
-
}
|
29
|
-
|
30
|
-
@return $span-width;
|
7
|
+
@return span-width($n, $columns, $width, $gutter);
|
31
8
|
}
|
32
9
|
|
33
10
|
// Styles for the grid row containing the columns.
|
@@ -42,11 +19,11 @@
|
|
42
19
|
@mixin grid-column($width: $grid-width, $gutter: $grid-gutter) {
|
43
20
|
position: relative;
|
44
21
|
min-height: 1px;
|
45
|
-
float:
|
22
|
+
float: $align-direction;
|
46
23
|
|
47
24
|
@if $gutter {
|
48
|
-
margin-
|
25
|
+
margin-#{$align-opposite-direction}: gutter($width, $gutter);
|
49
26
|
|
50
|
-
&:last-child { margin-
|
27
|
+
&:last-child { margin-#{$align-opposite-direction}: 0; }
|
51
28
|
}
|
52
|
-
}
|
29
|
+
}
|
@@ -29,16 +29,16 @@
|
|
29
29
|
}
|
30
30
|
|
31
31
|
// Remove the first selector character (#, ., etc) from the class name or ID
|
32
|
-
@function remove-selector
|
32
|
+
@function remove-selector($selector) {
|
33
33
|
@return str-slice($selector, 2, str-length($selector));
|
34
34
|
}
|
35
35
|
|
36
36
|
// Generate a class name and apply an optional prefix
|
37
|
-
@function class-name($class, $prefix: $
|
37
|
+
@function class-name($class, $prefix: $namespace, $selector: ".") {
|
38
38
|
$name: $class;
|
39
39
|
|
40
40
|
@if str_slice($class, 1, 1) == $selector {
|
41
|
-
$name: remove-selector
|
41
|
+
$name: remove-selector($name);
|
42
42
|
}
|
43
43
|
|
44
44
|
@if $prefix != "" {
|
@@ -61,4 +61,33 @@
|
|
61
61
|
}
|
62
62
|
|
63
63
|
@return $name;
|
64
|
-
}
|
64
|
+
}
|
65
|
+
|
66
|
+
// Calculate the gutter spacing as a percentage.
|
67
|
+
// Use the max width of the grid to calculate against.
|
68
|
+
@function gutter($width, $gutter) {
|
69
|
+
@return if($gutter, ((to-pixel($gutter) / to-pixel($width)) * 100 * 1%), 0%);
|
70
|
+
}
|
71
|
+
|
72
|
+
// Calculate the width of an individual element within a row.
|
73
|
+
// Take into account max widths and gutters.
|
74
|
+
@function span-width($n, $columns, $width, $gutter) {
|
75
|
+
$row-width: 100%;
|
76
|
+
$gutter-width: 0%;
|
77
|
+
|
78
|
+
// If a gutter is set, remove width based on the sum of the gutter columns
|
79
|
+
@if $gutter {
|
80
|
+
$gutter-width: gutter($width, $gutter);
|
81
|
+
$row-width: $row-width - ($gutter-width * ($columns - 1));
|
82
|
+
}
|
83
|
+
|
84
|
+
// The column width should span a division of the total width
|
85
|
+
$span-width: ($row-width / $columns) * $n;
|
86
|
+
|
87
|
+
// If a gutter is set, increase the column width to fill in the missing gaps
|
88
|
+
@if $gutter and $n > 1 {
|
89
|
+
$span-width: $span-width + (($n - 1) * $gutter-width);
|
90
|
+
}
|
91
|
+
|
92
|
+
@return $span-width;
|
93
|
+
}
|
@@ -1,4 +1,18 @@
|
|
1
1
|
|
2
|
+
// Export a component into the compiled output only once
|
3
|
+
// Also check to see if it has been excluded from the output all together
|
4
|
+
@mixin export($module) {
|
5
|
+
// Module is excluded, so do nothing
|
6
|
+
@if (index($modules-excluded, $module) != null) {
|
7
|
+
|
8
|
+
// Module hasn't been exported yet, so export it and log usage
|
9
|
+
} @else if (index($modules-exported, $module) == null) {
|
10
|
+
$modules-exported: append($modules-exported, $module) !global;
|
11
|
+
|
12
|
+
@content;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
2
16
|
// Container clear fix for floats
|
3
17
|
@mixin clear-fix {
|
4
18
|
&::after {
|
@@ -87,4 +101,17 @@
|
|
87
101
|
@content;
|
88
102
|
}
|
89
103
|
}
|
90
|
-
}
|
104
|
+
}
|
105
|
+
|
106
|
+
// Generate code blocks for LTR and RTL styles.
|
107
|
+
@mixin ltr() {
|
108
|
+
&[dir="ltr"] {
|
109
|
+
@content;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
@mixin rtl() {
|
114
|
+
&[dir="rtl"] {
|
115
|
+
@content;
|
116
|
+
}
|
117
|
+
}
|
data/version.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0
|
1
|
+
2.1.0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: titon-toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Project Titon
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sass
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- scss/toolkit/components/code.scss
|
65
65
|
- scss/toolkit/components/divider.scss
|
66
66
|
- scss/toolkit/components/drop.scss
|
67
|
+
- scss/toolkit/components/flex.scss
|
67
68
|
- scss/toolkit/components/flyout.scss
|
68
69
|
- scss/toolkit/components/form.scss
|
69
70
|
- scss/toolkit/components/grid.scss
|
@@ -93,6 +94,7 @@ files:
|
|
93
94
|
- scss/toolkit/components/type-ahead.scss
|
94
95
|
- scss/toolkit/components/typography.scss
|
95
96
|
- scss/toolkit/mixins/_components.scss
|
97
|
+
- scss/toolkit/mixins/_flex.scss
|
96
98
|
- scss/toolkit/mixins/_grid.scss
|
97
99
|
- scss/toolkit/mixins/_helper.scss
|
98
100
|
- scss/toolkit/mixins/_layout.scss
|