bulma-rails 0.0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/README.md +44 -0
- data/app/assets/stylesheets/bulma.sass +9 -0
- data/app/assets/stylesheets/bulma/base/base.sass +6 -0
- data/app/assets/stylesheets/bulma/base/content.sass +51 -0
- data/app/assets/stylesheets/bulma/base/generic.sass +101 -0
- data/app/assets/stylesheets/bulma/base/helpers.sass +27 -0
- data/app/assets/stylesheets/bulma/base/highlight.sass +123 -0
- data/app/assets/stylesheets/bulma/components/card.sass +39 -0
- data/app/assets/stylesheets/bulma/components/components.sass +11 -0
- data/app/assets/stylesheets/bulma/components/grid.sass +48 -0
- data/app/assets/stylesheets/bulma/components/media.sass +69 -0
- data/app/assets/stylesheets/bulma/components/menu.sass +25 -0
- data/app/assets/stylesheets/bulma/components/navbar.sass +45 -0
- data/app/assets/stylesheets/bulma/components/table.sass +73 -0
- data/app/assets/stylesheets/bulma/components/tabs.sass +101 -0
- data/app/assets/stylesheets/bulma/config/generated-variables.sass +74 -0
- data/app/assets/stylesheets/bulma/config/variables.sass +41 -0
- data/app/assets/stylesheets/bulma/elements/buttons.sass +100 -0
- data/app/assets/stylesheets/bulma/elements/controls.sass +224 -0
- data/app/assets/stylesheets/bulma/elements/elements.sass +172 -0
- data/app/assets/stylesheets/bulma/elements/messages.sass +41 -0
- data/app/assets/stylesheets/bulma/elements/notifications.sass +20 -0
- data/app/assets/stylesheets/bulma/elements/titles.sass +57 -0
- data/app/assets/stylesheets/bulma/layout/footer.sass +11 -0
- data/app/assets/stylesheets/bulma/layout/header.sass +145 -0
- data/app/assets/stylesheets/bulma/layout/hero.sass +147 -0
- data/app/assets/stylesheets/bulma/layout/layout.sass +6 -0
- data/app/assets/stylesheets/bulma/layout/section.sass +11 -0
- data/app/assets/stylesheets/bulma/utilities/animations.sass +5 -0
- data/app/assets/stylesheets/bulma/utilities/functions.sass +34 -0
- data/app/assets/stylesheets/bulma/utilities/mixins.sass +83 -0
- data/app/assets/stylesheets/bulma/utilities/reset.sass +174 -0
- data/app/assets/stylesheets/bulma/utilities/utilities.sass +6 -0
- data/bulma-rails.gemspec +18 -0
- data/lib/bulma-rails.rb +4 -0
- metadata +95 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
.title,
|
2
|
+
.subtitle
|
3
|
+
font-weight: 300
|
4
|
+
&:not(:last-child)
|
5
|
+
margin-bottom: 20px
|
6
|
+
|
7
|
+
.title
|
8
|
+
color: $text-strong
|
9
|
+
font-size: $size-large
|
10
|
+
line-height: 1
|
11
|
+
strong
|
12
|
+
color: inherit
|
13
|
+
code
|
14
|
+
display: inline-block
|
15
|
+
font-size: $size-large
|
16
|
+
& + .subtitle
|
17
|
+
margin-top: -10px
|
18
|
+
& + .highlight
|
19
|
+
margin-top: -10px
|
20
|
+
&.is-normal
|
21
|
+
font-weight: 400
|
22
|
+
strong
|
23
|
+
font-weight: 700
|
24
|
+
@each $size in $sizes
|
25
|
+
$i: index($sizes, $size)
|
26
|
+
&.is-#{$i}
|
27
|
+
font-size: $size
|
28
|
+
code
|
29
|
+
font-size: nth($sizes, min($i + 1, 6))
|
30
|
+
+tablet
|
31
|
+
& + .subtitle
|
32
|
+
margin-top: -15px
|
33
|
+
|
34
|
+
.subtitle
|
35
|
+
font-size: $size-medium
|
36
|
+
line-height: 1.125
|
37
|
+
strong
|
38
|
+
color: $text-strong
|
39
|
+
font-weight: 400
|
40
|
+
code
|
41
|
+
border-radius: $radius
|
42
|
+
display: inline-block
|
43
|
+
font-size: $size-normal
|
44
|
+
padding: 2px 3px
|
45
|
+
vertical-align: top
|
46
|
+
& + .text
|
47
|
+
margin-top: 20px
|
48
|
+
&.is-normal
|
49
|
+
font-weight: 400
|
50
|
+
strong
|
51
|
+
font-weight: 700
|
52
|
+
@each $size in $sizes
|
53
|
+
$i: index($sizes, $size)
|
54
|
+
&.is-#{$i}
|
55
|
+
font-size: $size
|
56
|
+
code
|
57
|
+
font-size: nth($sizes, min($i + 1, 6))
|
@@ -0,0 +1,145 @@
|
|
1
|
+
.header
|
2
|
+
+clearfix
|
3
|
+
background: white
|
4
|
+
box-shadow: 0 1px 2px rgba(black, 0.1)
|
5
|
+
display: flex
|
6
|
+
height: $header-height
|
7
|
+
line-height: 24px
|
8
|
+
position: relative
|
9
|
+
text-align: center
|
10
|
+
z-index: 2
|
11
|
+
.container
|
12
|
+
align-items: stretch
|
13
|
+
box-shadow: 0 1px 0 rgba($border, 0.3)
|
14
|
+
display: flex
|
15
|
+
width: 100%
|
16
|
+
|
17
|
+
.header-toggle
|
18
|
+
@extend .hamburger
|
19
|
+
+tablet
|
20
|
+
display: none
|
21
|
+
|
22
|
+
// Elements
|
23
|
+
|
24
|
+
.header-item
|
25
|
+
align-items: center
|
26
|
+
display: flex
|
27
|
+
padding: 10px
|
28
|
+
img
|
29
|
+
max-height: 24px
|
30
|
+
a
|
31
|
+
color: $text
|
32
|
+
&:hover
|
33
|
+
color: $link-hover
|
34
|
+
&.is-active
|
35
|
+
color: $link-active
|
36
|
+
.fa
|
37
|
+
font-size: 21px
|
38
|
+
line-height: 24px
|
39
|
+
|
40
|
+
.header-icon
|
41
|
+
+fa(14px, 24px)
|
42
|
+
color: $text
|
43
|
+
margin: 0 5px
|
44
|
+
&:hover
|
45
|
+
color: $link-hover
|
46
|
+
|
47
|
+
.header-tab
|
48
|
+
align-items: center
|
49
|
+
border-bottom: 1px solid transparent
|
50
|
+
color: $text
|
51
|
+
display: block
|
52
|
+
height: $header-height
|
53
|
+
line-height: 24px
|
54
|
+
padding: 13px 15px
|
55
|
+
&:hover
|
56
|
+
border-bottom: 1px solid $link
|
57
|
+
&.is-active
|
58
|
+
border-bottom: 3px solid $link
|
59
|
+
color: $link
|
60
|
+
|
61
|
+
// Containers
|
62
|
+
|
63
|
+
.header-left
|
64
|
+
align-items: stretch
|
65
|
+
display: flex
|
66
|
+
flex: 1
|
67
|
+
overflow: hidden
|
68
|
+
overflow-x: auto
|
69
|
+
white-space: nowrap
|
70
|
+
+desktop
|
71
|
+
.header-item:first-child
|
72
|
+
padding-left: 0
|
73
|
+
|
74
|
+
.header-center
|
75
|
+
align-items: stretch
|
76
|
+
display: flex
|
77
|
+
left: 50%
|
78
|
+
position: absolute
|
79
|
+
transform: translateX(-50%)
|
80
|
+
|
81
|
+
.header-right
|
82
|
+
align-items: stretch
|
83
|
+
+tablet
|
84
|
+
display: flex
|
85
|
+
+desktop
|
86
|
+
.header-item:last-child
|
87
|
+
padding-right: 0
|
88
|
+
|
89
|
+
.header-full
|
90
|
+
align-items: stretch
|
91
|
+
display: flex
|
92
|
+
justify-content: center
|
93
|
+
text-align: center
|
94
|
+
width: 100%
|
95
|
+
& > .header-item
|
96
|
+
align-items: stretch
|
97
|
+
display: flex
|
98
|
+
flex: 1
|
99
|
+
justify-content: center
|
100
|
+
padding: 0
|
101
|
+
& > a
|
102
|
+
align-items: center
|
103
|
+
display: flex
|
104
|
+
justify-content: center
|
105
|
+
width: 100%
|
106
|
+
|
107
|
+
.header-menu
|
108
|
+
+mobile
|
109
|
+
background: white
|
110
|
+
box-shadow: 0 4px 7px rgba(black, 0.1)
|
111
|
+
display: none
|
112
|
+
position: absolute
|
113
|
+
right: 0
|
114
|
+
top: $header-height
|
115
|
+
z-index: 100
|
116
|
+
.header-item
|
117
|
+
border-top: 1px solid rgba($border, 0.5)
|
118
|
+
padding: 10px
|
119
|
+
&.is-active
|
120
|
+
display: block
|
121
|
+
|
122
|
+
// States
|
123
|
+
|
124
|
+
.header.is-centered
|
125
|
+
justify-content: center
|
126
|
+
.header-left,
|
127
|
+
.header-center,
|
128
|
+
.header-right
|
129
|
+
justify-content: center
|
130
|
+
|
131
|
+
.header.is-small
|
132
|
+
background: $background
|
133
|
+
box-shadow: none
|
134
|
+
height: 40px
|
135
|
+
z-index: 1
|
136
|
+
.container
|
137
|
+
height: 40px
|
138
|
+
.header-tab
|
139
|
+
font-size: 13px
|
140
|
+
height: 40px
|
141
|
+
padding: 8px 10px
|
142
|
+
&:hover,
|
143
|
+
&.is-active
|
144
|
+
border-bottom-width: 2px
|
145
|
+
|
@@ -0,0 +1,147 @@
|
|
1
|
+
.hero-video
|
2
|
+
+overlay
|
3
|
+
overflow: hidden
|
4
|
+
&.is-transparent
|
5
|
+
opacity: 0.3
|
6
|
+
video
|
7
|
+
left: 50%
|
8
|
+
min-height: 100%
|
9
|
+
min-width: 100%
|
10
|
+
position: absolute
|
11
|
+
top: 50%
|
12
|
+
transform: translate3d(-50%, -50%, 0)
|
13
|
+
+mobile
|
14
|
+
display: none
|
15
|
+
|
16
|
+
.hero-content
|
17
|
+
padding: 40px 20px
|
18
|
+
+desktop
|
19
|
+
padding: 40px 0
|
20
|
+
|
21
|
+
.hero-buttons
|
22
|
+
margin-top: 20px
|
23
|
+
+mobile
|
24
|
+
.button
|
25
|
+
display: block
|
26
|
+
&:not(:last-child)
|
27
|
+
margin-bottom: 10px
|
28
|
+
+tablet
|
29
|
+
display: flex
|
30
|
+
justify-content: center
|
31
|
+
.button:not(:last-child)
|
32
|
+
margin-right: 20px
|
33
|
+
|
34
|
+
.hero
|
35
|
+
background: white
|
36
|
+
text-align: center
|
37
|
+
.header
|
38
|
+
background: none
|
39
|
+
box-shadow: none
|
40
|
+
.tabs
|
41
|
+
a
|
42
|
+
border: none
|
43
|
+
ul
|
44
|
+
border-bottom: none
|
45
|
+
&.is-alt
|
46
|
+
background: $background
|
47
|
+
color: $text-light
|
48
|
+
@each $name, $pair in $colors
|
49
|
+
$color: nth($pair, 1)
|
50
|
+
$color-invert: nth($pair, 2)
|
51
|
+
&.is-#{$name}
|
52
|
+
background: $color
|
53
|
+
color: $color-invert
|
54
|
+
.title
|
55
|
+
color: $color-invert
|
56
|
+
a,
|
57
|
+
strong
|
58
|
+
color: inherit
|
59
|
+
.subtitle
|
60
|
+
color: rgba($color-invert, 0.7)
|
61
|
+
strong
|
62
|
+
color: $color-invert
|
63
|
+
.header .container
|
64
|
+
box-shadow: 0 1px 0 rgba($color-invert, 0.2)
|
65
|
+
.header-icon,
|
66
|
+
.header-item > a:not(.button)
|
67
|
+
color: $color-invert
|
68
|
+
opacity: 0.5
|
69
|
+
&:hover,
|
70
|
+
&.is-active
|
71
|
+
opacity: 1
|
72
|
+
.tabs
|
73
|
+
a
|
74
|
+
color: $color-invert
|
75
|
+
opacity: 0.5
|
76
|
+
&:hover
|
77
|
+
opacity: 1
|
78
|
+
li.is-active a
|
79
|
+
opacity: 1
|
80
|
+
&.is-boxed,
|
81
|
+
&.is-toggle
|
82
|
+
a
|
83
|
+
color: $color-invert
|
84
|
+
&:hover
|
85
|
+
background: rgba(black, 0.1)
|
86
|
+
li.is-active a
|
87
|
+
&,
|
88
|
+
&:hover
|
89
|
+
background: $color-invert
|
90
|
+
color: $color
|
91
|
+
&.is-bold
|
92
|
+
$gradient-top-left: darken(saturate(adjust-hue($color, -10deg), 10%), 10%)
|
93
|
+
$gradient-bottom-right: lighten(saturate(adjust-hue($color, 10deg), 5%), 5%)
|
94
|
+
background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%)
|
95
|
+
+mobile
|
96
|
+
.header-toggle
|
97
|
+
span
|
98
|
+
background: $color-invert
|
99
|
+
&:hover
|
100
|
+
background: rgba(black, 0.1)
|
101
|
+
&.is-active
|
102
|
+
span
|
103
|
+
background: $color-invert
|
104
|
+
.header-menu
|
105
|
+
background: $color
|
106
|
+
.header-item
|
107
|
+
border-top-color: rgba($color-invert, 0.2)
|
108
|
+
&.is-fullheight,
|
109
|
+
&.is-large
|
110
|
+
+tablet
|
111
|
+
.tabs
|
112
|
+
font-size: $size-medium
|
113
|
+
&.is-medium
|
114
|
+
+tablet
|
115
|
+
.hero-content
|
116
|
+
padding: 120px 20px
|
117
|
+
+desktop
|
118
|
+
.hero-content
|
119
|
+
padding: 120px 0
|
120
|
+
&.is-large
|
121
|
+
.tabs
|
122
|
+
a
|
123
|
+
padding: 10px 15px
|
124
|
+
+tablet
|
125
|
+
.hero-content
|
126
|
+
padding: 240px 20px
|
127
|
+
+desktop
|
128
|
+
.hero-content
|
129
|
+
padding: 240px 0
|
130
|
+
&.is-fullheight
|
131
|
+
align-items: stretch
|
132
|
+
display: flex
|
133
|
+
flex-direction: column
|
134
|
+
height: 100vh
|
135
|
+
justify-content: space-between
|
136
|
+
.tabs
|
137
|
+
a
|
138
|
+
padding: 15px 20px
|
139
|
+
.hero-content
|
140
|
+
display: flex
|
141
|
+
flex: 1
|
142
|
+
flex-direction: column
|
143
|
+
justify-content: center
|
144
|
+
&.is-left
|
145
|
+
text-align: left
|
146
|
+
&.is-right
|
147
|
+
text-align: right
|
@@ -0,0 +1,34 @@
|
|
1
|
+
@function powerNumber($number, $exp)
|
2
|
+
$value: 1
|
3
|
+
@if $exp > 0
|
4
|
+
@for $i from 1 through $exp
|
5
|
+
$value: $value * $number
|
6
|
+
@else if $exp < 0
|
7
|
+
@for $i from 1 through -$exp
|
8
|
+
$value: $value / $number
|
9
|
+
@return $value
|
10
|
+
|
11
|
+
@function colorLuminance($color)
|
12
|
+
$colors: ('red': red($color),'green': green($color),'blue': blue($color))
|
13
|
+
@each $name, $value in $colors
|
14
|
+
$adjusted: 0
|
15
|
+
$value: $value / 255
|
16
|
+
@if $value < 0.03928
|
17
|
+
$value: $value / 12.92
|
18
|
+
@else
|
19
|
+
$value: ($value + .055) / 1.055
|
20
|
+
$value: powerNumber($value, 2)
|
21
|
+
$colors: map-merge($colors, ($name: $value))
|
22
|
+
@return (map-get($colors, 'red') * .2126) + (map-get($colors, 'green') * .7152) + (map-get($colors, 'blue') * .0722)
|
23
|
+
|
24
|
+
@function closestEvenNumber($number)
|
25
|
+
@if ($number % 2 == 0px)
|
26
|
+
@return $number
|
27
|
+
@else
|
28
|
+
@return ($number + 1px)
|
29
|
+
|
30
|
+
@function findColorInvert($color)
|
31
|
+
@if (colorLuminance($color) > 0.8)
|
32
|
+
@return rgba(black, 0.5)
|
33
|
+
@else
|
34
|
+
@return white
|
@@ -0,0 +1,83 @@
|
|
1
|
+
=arrow($color)
|
2
|
+
border: 1px solid $color
|
3
|
+
border-right: 0
|
4
|
+
border-top: 0
|
5
|
+
content: " "
|
6
|
+
display: block
|
7
|
+
height: 7px
|
8
|
+
pointer-events: none
|
9
|
+
position: absolute
|
10
|
+
transform: rotate(-45deg)
|
11
|
+
width: 7px
|
12
|
+
|
13
|
+
=clearfix
|
14
|
+
&:after
|
15
|
+
clear: both
|
16
|
+
content: " "
|
17
|
+
display: table
|
18
|
+
|
19
|
+
=center($size)
|
20
|
+
left: 50%
|
21
|
+
margin-left: -($size / 2)
|
22
|
+
margin-top: -($size / 2)
|
23
|
+
position: absolute
|
24
|
+
top: 50%
|
25
|
+
|
26
|
+
=fa($size, $dimensions)
|
27
|
+
display: inline-block
|
28
|
+
font-size: $size
|
29
|
+
height: $dimensions
|
30
|
+
line-height: $dimensions
|
31
|
+
text-align: center
|
32
|
+
vertical-align: top
|
33
|
+
width: $dimensions
|
34
|
+
|
35
|
+
=overlay($offset: 0)
|
36
|
+
bottom: $offset
|
37
|
+
left: $offset
|
38
|
+
position: absolute
|
39
|
+
right: $offset
|
40
|
+
top: $offset
|
41
|
+
|
42
|
+
=placeholder
|
43
|
+
$placeholders: ':-moz' ':-webkit-input' '-moz' '-ms-input'
|
44
|
+
@each $placeholder in $placeholders
|
45
|
+
&:#{$placeholder}-placeholder
|
46
|
+
@content
|
47
|
+
|
48
|
+
=replace($background, $width, $height)
|
49
|
+
background: $background center center no-repeat
|
50
|
+
background-size: $width $height
|
51
|
+
display: block
|
52
|
+
height: $height
|
53
|
+
outline: none
|
54
|
+
overflow: hidden
|
55
|
+
text-indent: -290486px
|
56
|
+
width: $width
|
57
|
+
|
58
|
+
$tablet: 769px
|
59
|
+
$desktop: 980px
|
60
|
+
|
61
|
+
=from($device)
|
62
|
+
@media screen and (min-width: $device)
|
63
|
+
@content
|
64
|
+
|
65
|
+
=until($device)
|
66
|
+
@media screen and (max-width: $device - 1px)
|
67
|
+
@content
|
68
|
+
|
69
|
+
=mobile
|
70
|
+
@media screen and (max-width: $tablet - 1px)
|
71
|
+
@content
|
72
|
+
|
73
|
+
=tablet
|
74
|
+
@media screen and (min-width: $tablet)
|
75
|
+
@content
|
76
|
+
|
77
|
+
=touch
|
78
|
+
@media screen and (max-width: $desktop - 1px)
|
79
|
+
@content
|
80
|
+
|
81
|
+
=desktop
|
82
|
+
@media screen and (min-width: $desktop)
|
83
|
+
@content
|