shipyard-framework 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/javascripts/shipyard/modal.js +2 -2
- data/assets/stylesheets/shipyard/_components.sass +4 -0
- data/assets/stylesheets/shipyard/_mixins.sass +2 -0
- data/assets/stylesheets/shipyard/_utilities.sass +22 -8
- data/assets/stylesheets/shipyard/_variables.sass +1 -3
- data/assets/stylesheets/shipyard/{utilities → components}/_accordion.sass +4 -4
- data/assets/stylesheets/shipyard/components/_alerts.sass +8 -10
- data/assets/stylesheets/shipyard/components/_boxes.sass +1 -15
- data/assets/stylesheets/shipyard/components/_bullet.sass +6 -0
- data/assets/stylesheets/shipyard/components/_buttons.sass +0 -3
- data/assets/stylesheets/shipyard/components/_container.sass +6 -0
- data/assets/stylesheets/shipyard/components/_forms.sass +1 -1
- data/assets/stylesheets/shipyard/components/_grid.sass +62 -0
- data/assets/stylesheets/shipyard/components/_hamburger.sass +4 -4
- data/assets/stylesheets/shipyard/components/_header.sass +14 -14
- data/assets/stylesheets/shipyard/components/_horizontal-rules.sass +1 -1
- data/assets/stylesheets/shipyard/components/_input-radio-checkbox.sass +1 -1
- data/assets/stylesheets/shipyard/components/_input-select.sass +1 -1
- data/assets/stylesheets/shipyard/components/_input-text.sass +1 -1
- data/assets/stylesheets/shipyard/components/_modals.sass +2 -3
- data/assets/stylesheets/shipyard/components/_notes.sass +6 -6
- data/assets/stylesheets/shipyard/components/_tables.sass +1 -1
- data/assets/stylesheets/shipyard/components/_tooltips.sass +8 -4
- data/assets/stylesheets/shipyard/core/_typography.sass +0 -19
- data/assets/stylesheets/shipyard/functions/_color.sass +4 -7
- data/assets/stylesheets/shipyard/mixins/_components.sass +0 -6
- data/assets/stylesheets/shipyard/mixins/_grid.sass +17 -0
- data/assets/stylesheets/shipyard/mixins/_responsive.sass +38 -42
- data/assets/stylesheets/shipyard/mixins/_utility.sass +50 -0
- data/assets/stylesheets/shipyard/utilities/_border-radius.sass +29 -39
- data/assets/stylesheets/shipyard/utilities/_box-shadow.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_center.sass +8 -14
- data/assets/stylesheets/shipyard/utilities/_colors.sass +2 -12
- data/assets/stylesheets/shipyard/utilities/_cursor.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_display.sass +1 -14
- data/assets/stylesheets/shipyard/utilities/_flex-direction.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_float.sass +4 -0
- data/assets/stylesheets/shipyard/utilities/_font-family.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_font-size.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_font-style.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_font-weight.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_height.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_margin.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_opacity.sass +1 -4
- data/assets/stylesheets/shipyard/utilities/_overflow.sass +3 -11
- data/assets/stylesheets/shipyard/utilities/_padding.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_position.sass +1 -4
- data/assets/stylesheets/shipyard/utilities/_text-align.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_text-decoration.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_text-overflow.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_text-shadow.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_text-transform.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_transform.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_transition.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_white-space.sass +1 -0
- data/assets/stylesheets/shipyard/utilities/_z-index.sass +1 -0
- data/assets/stylesheets/shipyard/variables/_color_utilities.sass +54 -54
- data/assets/stylesheets/shipyard/variables/_colors.scss +101 -88
- data/assets/stylesheets/shipyard/variables/_components.scss +0 -1
- data/assets/stylesheets/shipyard/variables/_options.scss +322 -0
- data/assets/stylesheets/shipyard/variables/_typography.sass +3 -2
- data/lib/shipyard-framework.rb +0 -3
- data/lib/shipyard-framework/helpers/alert_helper.rb +1 -1
- data/lib/shipyard-framework/version.rb +1 -1
- metadata +29 -11
- data/assets/stylesheets/shipyard/utilities/_grid.sass +0 -74
- data/assets/stylesheets/shipyard/utilities/_margin-padding.sass +0 -40
- data/assets/stylesheets/shipyard/utilities/_typography.sass +0 -104
- data/assets/stylesheets/shipyard/variables/_grid.sass +0 -2
- data/assets/stylesheets/shipyard/variables/_opacities.scss +0 -22
- data/assets/stylesheets/shipyard/variables/_z-index.scss +0 -9
- data/lib/shipyard-framework/helpers/button_helper.rb +0 -39
- data/lib/shipyard-framework/jekyll/tags/button_tag.rb +0 -21
@@ -1,5 +1,4 @@
|
|
1
1
|
+component('tooltip')
|
2
|
-
+z-index
|
3
2
|
+border-radius
|
4
3
|
width: auto
|
5
4
|
opacity: 0
|
@@ -55,7 +54,6 @@
|
|
55
54
|
transform: rotate(45deg)
|
56
55
|
transform-origin: center center
|
57
56
|
border: 4px solid transparent
|
58
|
-
z-index: map-get($z-index, 'tooltip-arrow')
|
59
57
|
&-top
|
60
58
|
left: 50%
|
61
59
|
margin-left: -4px
|
@@ -126,15 +124,21 @@
|
|
126
124
|
background-color: #fff
|
127
125
|
+box-shadow
|
128
126
|
|
129
|
-
// Data
|
127
|
+
// Data-Tooltip
|
130
128
|
&-data
|
131
129
|
+extend('parent')
|
130
|
+
|
131
|
+
// Data-Tooltip: Arrow
|
132
132
|
&::before
|
133
|
+
@extend .z-60 !optional
|
133
134
|
opacity: 0
|
134
135
|
visibility: hidden
|
135
136
|
transition: opacity 300ms ease 300ms, transform 300ms ease 300ms, visibility 0ms ease 300ms
|
137
|
+
|
138
|
+
// Data-Tooltip: Content
|
136
139
|
&::after
|
137
140
|
+extend
|
141
|
+
@extend .z-50 !optional
|
138
142
|
width: auto
|
139
143
|
min-width: 0
|
140
144
|
max-width: none
|
@@ -153,7 +157,7 @@
|
|
153
157
|
&::before
|
154
158
|
+extend('light')
|
155
159
|
|
156
|
-
// Data
|
160
|
+
// Data-Tooltip: Directions
|
157
161
|
@each $direction in (top, bottom, left, right)
|
158
162
|
&-#{$direction}
|
159
163
|
&::before
|
@@ -15,9 +15,6 @@
|
|
15
15
|
color: darken($blue, 10%)
|
16
16
|
text-decoration: underline
|
17
17
|
|
18
|
-
strong
|
19
|
-
font-weight: $bold
|
20
|
-
|
21
18
|
.list
|
22
19
|
list-style: circle
|
23
20
|
&, &-disc
|
@@ -36,19 +33,3 @@ button
|
|
36
33
|
background: none
|
37
34
|
border: none
|
38
35
|
cursor: pointer
|
39
|
-
|
40
|
-
h1, .h1
|
41
|
-
+respond-to(font-size, (x0: 20px, x1: 24px))
|
42
|
-
h2, .h2
|
43
|
-
font-size: 18px
|
44
|
-
|
45
|
-
.h-primary
|
46
|
-
margin-bottom: 0
|
47
|
-
+respond-to(font-size, (x0: 24px, x1: 28px))
|
48
|
-
.h-secondary
|
49
|
-
color: $text-color-lighter
|
50
|
-
font-weight: $normal
|
51
|
-
margin: 5px 0 30px
|
52
|
-
+respond-to(font-size, (x0: 16px, x1: 18px))
|
53
|
-
.h-margin
|
54
|
-
margin: 0 0 30px
|
@@ -1,10 +1,7 @@
|
|
1
1
|
@function color($name, $shade: null)
|
2
|
-
$colors: $colors !global
|
3
|
-
$color: map-get($colors, $name)
|
2
|
+
$shipyard-colors: $shipyard-colors !global
|
3
|
+
$color: map-get($shipyard-colors, $name)
|
4
4
|
@if $color
|
5
|
-
@
|
6
|
-
@return map-get($color, $shade)
|
7
|
-
@else
|
8
|
-
@return map-get($color, base)
|
5
|
+
@return $color
|
9
6
|
@else
|
10
|
-
@error "Sorry, but the color `#{$name}` hasn't been defined in the $colors variable."
|
7
|
+
@error "Sorry, but the color `#{$name}` hasn't been defined in the $shipyard-colors variable."
|
@@ -17,12 +17,6 @@
|
|
17
17
|
@else
|
18
18
|
@extend .#{$component} !optional
|
19
19
|
|
20
|
-
@mixin z-index($value: null)
|
21
|
-
@if $value
|
22
|
-
z-index: $value
|
23
|
-
@else if $component and map-get($z-index, $component)
|
24
|
-
z-index: map-get($z-index, $component)
|
25
|
-
|
26
20
|
@mixin component-styles($modifier)
|
27
21
|
$component-styles: map-get($components, $component)
|
28
22
|
@if $component-styles
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@mixin column-style($property, $width)
|
2
|
+
@if $width == 0 and $property == max-width
|
3
|
+
max-width: none
|
4
|
+
@else if $width == 66
|
5
|
+
#{$property}: 66.6666666666%
|
6
|
+
@else if $width == 33
|
7
|
+
#{$property}: 33.3333333333%
|
8
|
+
@else
|
9
|
+
#{$property}: percentage($width / 100)
|
10
|
+
|
11
|
+
@mixin column-sizes
|
12
|
+
@each $width in $widths
|
13
|
+
&-#{$width}
|
14
|
+
+column-style(max-width, $width)
|
15
|
+
+column-style(flex-basis, $width)
|
16
|
+
&-offset-#{$width}
|
17
|
+
+column-style(margin-left, $width)
|
@@ -29,84 +29,80 @@
|
|
29
29
|
|
30
30
|
@mixin all-media-sizes
|
31
31
|
@content
|
32
|
-
+media-sizes
|
33
|
-
@content
|
34
|
-
|
35
|
-
@mixin media-sizes
|
36
32
|
@each $breakpoint, $min-width in $breakpoints
|
37
|
-
|
33
|
+
@at-root #{".#{$breakpoint}\\:" + str-slice("#{&}", 2)}
|
38
34
|
+media(min-width $min-width)
|
39
35
|
@content
|
40
36
|
|
41
|
-
@mixin breakpoint-
|
42
|
-
+media(max-width map-get($breakpoints,
|
37
|
+
@mixin breakpoint-all
|
38
|
+
+media(max-width map-get($breakpoints, sm) - 1)
|
43
39
|
@content
|
44
40
|
|
45
|
-
@mixin breakpoint-
|
46
|
-
+media(min-width map-get($breakpoints,
|
41
|
+
@mixin breakpoint-sm
|
42
|
+
+media(min-width map-get($breakpoints, sm))
|
47
43
|
@content
|
48
44
|
|
49
|
-
@mixin breakpoint-
|
50
|
-
+media(min-width map-get($breakpoints,
|
45
|
+
@mixin breakpoint-md
|
46
|
+
+media(min-width map-get($breakpoints, md))
|
51
47
|
@content
|
52
48
|
|
53
|
-
@mixin breakpoint-
|
54
|
-
+media(min-width map-get($breakpoints,
|
49
|
+
@mixin breakpoint-lg
|
50
|
+
+media(min-width map-get($breakpoints, lg))
|
55
51
|
@content
|
56
52
|
|
57
|
-
@mixin breakpoint-
|
58
|
-
+media(min-width map-get($breakpoints,
|
53
|
+
@mixin breakpoint-xl
|
54
|
+
+media(min-width map-get($breakpoints, xl))
|
59
55
|
@content
|
60
56
|
|
61
57
|
@mixin responsive-padding($properties: null, $divisor: 2)
|
62
58
|
transition: padding 500ms ease
|
63
59
|
@if $properties
|
64
60
|
@each $property in $properties
|
65
|
-
padding-#{$property}: map-get($margins,
|
66
|
-
+breakpoint-
|
61
|
+
padding-#{$property}: map-get($margins, all) / $divisor
|
62
|
+
+breakpoint-sm
|
67
63
|
@each $property in $properties
|
68
|
-
padding-#{$property}: map-get($margins,
|
69
|
-
+breakpoint-
|
64
|
+
padding-#{$property}: map-get($margins, sm) / $divisor
|
65
|
+
+breakpoint-md
|
70
66
|
@each $property in $properties
|
71
|
-
padding-#{$property}: map-get($margins,
|
67
|
+
padding-#{$property}: map-get($margins, md) / $divisor
|
72
68
|
@else
|
73
|
-
+respond-to(padding, (
|
69
|
+
+respond-to(padding, (all: map-get($margins, all), sm: map-get($margins, sm), md: map-get($margins, md)))
|
74
70
|
|
75
71
|
@mixin responsive-margin($properties, $divisor: 2)
|
76
72
|
transition: margin 500ms ease
|
77
73
|
@each $property in $properties
|
78
|
-
margin-#{$property}: map-get($margins,
|
79
|
-
+breakpoint-
|
74
|
+
margin-#{$property}: map-get($margins, all) / $divisor
|
75
|
+
+breakpoint-sm
|
80
76
|
@each $property in $properties
|
81
|
-
margin-#{$property}: map-get($margins,
|
82
|
-
+breakpoint-
|
77
|
+
margin-#{$property}: map-get($margins, sm) / $divisor
|
78
|
+
+breakpoint-md
|
83
79
|
@each $property in $properties
|
84
|
-
margin-#{$property}: map-get($margins,
|
80
|
+
margin-#{$property}: map-get($margins, md) / $divisor
|
85
81
|
|
86
82
|
@mixin respond-to($property, $breakpoints)
|
87
|
-
@if map-has-key($breakpoints,
|
88
|
-
#{$property}: map-get($breakpoints,
|
89
|
-
@if map-has-key($breakpoints,
|
90
|
-
+breakpoint-
|
91
|
-
#{$property}: map-get($breakpoints,
|
92
|
-
@if map-has-key($breakpoints,
|
93
|
-
+breakpoint-
|
94
|
-
#{$property}: map-get($breakpoints,
|
95
|
-
@if map-has-key($breakpoints,
|
96
|
-
+breakpoint-
|
97
|
-
#{$property}: map-get($breakpoints,
|
83
|
+
@if map-has-key($breakpoints, all)
|
84
|
+
#{$property}: map-get($breakpoints, all)
|
85
|
+
@if map-has-key($breakpoints, sm)
|
86
|
+
+breakpoint-sm
|
87
|
+
#{$property}: map-get($breakpoints, sm)
|
88
|
+
@if map-has-key($breakpoints, md)
|
89
|
+
+breakpoint-md
|
90
|
+
#{$property}: map-get($breakpoints, md)
|
91
|
+
@if map-has-key($breakpoints, lg)
|
92
|
+
+breakpoint-lg
|
93
|
+
#{$property}: map-get($breakpoints, lg)
|
98
94
|
|
99
95
|
@mixin responsive-left
|
100
|
-
+respond-to(left, (
|
96
|
+
+respond-to(left, (all: map-get($margins, all), sm: map-get($margins, sm), md: map-get($margins, md)))
|
101
97
|
|
102
98
|
@mixin responsive-right
|
103
|
-
+respond-to(right, (
|
99
|
+
+respond-to(right, (all: map-get($margins, all), sm: map-get($margins, sm), md: map-get($margins, md)))
|
104
100
|
|
105
101
|
@mixin responsive-padding-left
|
106
|
-
+respond-to(padding-left, (
|
102
|
+
+respond-to(padding-left, (all: map-get($margins, all), sm: map-get($margins, sm), md: map-get($margins, md)))
|
107
103
|
|
108
104
|
@mixin responsive-padding-right
|
109
|
-
+respond-to(padding-right, (
|
105
|
+
+respond-to(padding-right, (all: map-get($margins, all), sm: map-get($margins, sm), md: map-get($margins, md)))
|
110
106
|
|
111
107
|
@function merge-and-add($map1, $map2)
|
112
|
-
@return (
|
108
|
+
@return (all: map-get($map1, all) + map-get($map2, all), sm: map-get($map1, sm) + map-get($map2, sm), md: map-get($map1, md) + map-get($map2, md))
|
@@ -0,0 +1,50 @@
|
|
1
|
+
@function utility-class($prefix, $class)
|
2
|
+
@if $prefix
|
3
|
+
$class: if($class == '', $prefix, "#{$prefix}-#{$class}")
|
4
|
+
@return $class
|
5
|
+
|
6
|
+
@mixin utility($name)
|
7
|
+
$utility: map-get($shipyard-options, $name)
|
8
|
+
|
9
|
+
@if $utility != false
|
10
|
+
$prefix: map-get($utility, prefix)
|
11
|
+
$utility-values: map-get($utility, values)
|
12
|
+
$utility-variants: map-get($utility, variants)
|
13
|
+
$utility-is-responsive: map-get($utility, responsive)
|
14
|
+
|
15
|
+
// Print out styles for all screens
|
16
|
+
@each $class, $value in $utility-values
|
17
|
+
$value: if($value, $value, $class)
|
18
|
+
.#{utility-class($prefix, $class)}
|
19
|
+
#{$name}: $value
|
20
|
+
|
21
|
+
// Print out variants like: left, right, top, bottom
|
22
|
+
@if $utility-variants
|
23
|
+
@each $v-class, $v-prop in $utility-variants
|
24
|
+
.#{utility-class($prefix + $v-class, $class)}
|
25
|
+
#{$name}-#{$v-prop}: $value
|
26
|
+
|
27
|
+
// Print out other utility content
|
28
|
+
@if $prefix
|
29
|
+
.#{$prefix}
|
30
|
+
@content
|
31
|
+
|
32
|
+
// Print out styles for all breakpoints
|
33
|
+
@if $utility-is-responsive
|
34
|
+
@each $breakpoint, $min-width in $breakpoints
|
35
|
+
@media screen and (min-width:#{$min-width})
|
36
|
+
@each $class, $value in $utility-values
|
37
|
+
$value: if($value, $value, $class)
|
38
|
+
.#{$breakpoint + '\\:' + utility-class($prefix, $class)}
|
39
|
+
#{$name}: $value
|
40
|
+
|
41
|
+
// Print out variants like: left, right, top, bottom
|
42
|
+
@if $utility-variants
|
43
|
+
@each $v-class, $v-prop in $utility-variants
|
44
|
+
.#{$breakpoint + '\\:' + utility-class($prefix + $v-class, $class)}
|
45
|
+
#{$name}-#{$v-prop}: $value
|
46
|
+
|
47
|
+
// Print out other utility content
|
48
|
+
@if $prefix
|
49
|
+
.#{$breakpoint + '\\:' + $prefix}
|
50
|
+
@content
|
@@ -1,39 +1,29 @@
|
|
1
|
-
+
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
border-bottom-left-radius: 0
|
31
|
-
border-bottom-right-radius: 0
|
32
|
-
&-bottom-left
|
33
|
-
border-top-left-radius: 0
|
34
|
-
border-top-right-radius: 0
|
35
|
-
border-bottom-right-radius: 0
|
36
|
-
&-bottom-right
|
37
|
-
border-top-left-radius: 0
|
38
|
-
border-top-right-radius: 0
|
39
|
-
border-bottom-left-radius: 0
|
1
|
+
+utility(border-radius)
|
2
|
+
&-top
|
3
|
+
border-bottom-left-radius: 0
|
4
|
+
border-bottom-right-radius: 0
|
5
|
+
&-bottom
|
6
|
+
border-top-left-radius: 0
|
7
|
+
border-top-right-radius: 0
|
8
|
+
&-left
|
9
|
+
border-top-right-radius: 0
|
10
|
+
border-bottom-right-radius: 0
|
11
|
+
&-right
|
12
|
+
border-top-left-radius: 0
|
13
|
+
border-bottom-left-radius: 0
|
14
|
+
&-top-left
|
15
|
+
border-top-right-radius: 0
|
16
|
+
border-bottom-left-radius: 0
|
17
|
+
border-bottom-right-radius: 0
|
18
|
+
&-top-right
|
19
|
+
border-top-left-radius: 0
|
20
|
+
border-bottom-left-radius: 0
|
21
|
+
border-bottom-right-radius: 0
|
22
|
+
&-bottom-left
|
23
|
+
border-top-left-radius: 0
|
24
|
+
border-top-right-radius: 0
|
25
|
+
border-bottom-right-radius: 0
|
26
|
+
&-bottom-right
|
27
|
+
border-top-left-radius: 0
|
28
|
+
border-top-right-radius: 0
|
29
|
+
border-bottom-left-radius: 0
|
@@ -0,0 +1 @@
|
|
1
|
+
+utility(box-shadow)
|
@@ -1,16 +1,10 @@
|
|
1
|
-
|
2
|
-
+
|
3
|
-
|
4
|
-
|
5
|
-
.v-center
|
6
|
-
+all-media-sizes
|
1
|
+
+utility(center)
|
2
|
+
+center
|
3
|
+
&-v
|
7
4
|
+center($vertical: true)
|
8
|
-
|
9
|
-
.h-center
|
10
|
-
+all-media-sizes
|
5
|
+
&-h
|
11
6
|
+center($horizontal: true)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
vertical-align: middle
|
7
|
+
&-obj
|
8
|
+
top: -1px
|
9
|
+
position: relative
|
10
|
+
vertical-align: middle
|
@@ -1,12 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
@if $shade == base
|
4
|
-
.#{$color}
|
5
|
-
color: $value
|
6
|
-
.bg-#{$color}
|
7
|
-
background-color: $value
|
8
|
-
@else
|
9
|
-
.#{$color}-#{$shade}
|
10
|
-
color: $value
|
11
|
-
.bg-#{$color}-#{$shade}
|
12
|
-
background-color: $value
|
1
|
+
+utility(color)
|
2
|
+
+utility(background-color)
|
@@ -0,0 +1 @@
|
|
1
|
+
+utility(cursor)
|
@@ -1,14 +1 @@
|
|
1
|
-
|
2
|
-
+all-media-sizes
|
3
|
-
@each $value in (none, left, right)
|
4
|
-
&-#{$value}
|
5
|
-
float: $value
|
6
|
-
|
7
|
-
.display
|
8
|
-
+all-media-sizes
|
9
|
-
@each $value in (flex, block, table, inline, inline-block, none)
|
10
|
-
&-#{$value}
|
11
|
-
display: $value
|
12
|
-
|
13
|
-
.clearfix
|
14
|
-
+clearfix
|
1
|
+
+utility(display)
|
@@ -0,0 +1 @@
|
|
1
|
+
+utility(flex-direction)
|