mirror of
https://github.com/jgthms/bulma
synced 2026-03-23 05:19:35 -07:00
Fix layout code style
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
### BREAKING
|
### BREAKING
|
||||||
|
|
||||||
* `.is-text-*` renamed to `.has-text-*`
|
* `.is-text-*` renamed to `.has-text-*`
|
||||||
* `.is-gapless` renamed to `.has-no-gap`
|
|
||||||
* removed `.is-fullwidth` helper
|
* removed `.is-fullwidth` helper
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
.content
|
.content
|
||||||
@extend .block
|
@extend .block
|
||||||
&.is-medium
|
// Inline
|
||||||
font-size: $size-5
|
li + li
|
||||||
code
|
margin-top: 0.25em
|
||||||
font-size: $size-6
|
// Block
|
||||||
&.is-large
|
blockquote,
|
||||||
font-size: $size-4
|
p,
|
||||||
code
|
ol,
|
||||||
font-size: $size-5
|
ul
|
||||||
|
&:not(:last-child)
|
||||||
|
margin-bottom: 1em
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
@@ -23,6 +25,10 @@
|
|||||||
h3
|
h3
|
||||||
&:not(:first-child)
|
&:not(:first-child)
|
||||||
margin-top: 40px
|
margin-top: 40px
|
||||||
|
blockquote
|
||||||
|
background: $background
|
||||||
|
border-left: 5px solid $border
|
||||||
|
padding: 1.5em
|
||||||
h1
|
h1
|
||||||
font-size: 2em
|
font-size: 2em
|
||||||
h2
|
h2
|
||||||
@@ -35,24 +41,27 @@
|
|||||||
font-size: 1.125em
|
font-size: 1.125em
|
||||||
h6
|
h6
|
||||||
font-size: 1em
|
font-size: 1em
|
||||||
p:not(:last-child)
|
|
||||||
margin-bottom: 1em
|
|
||||||
li + li
|
|
||||||
margin-top: 0.25em
|
|
||||||
ol
|
ol
|
||||||
list-style: decimal outside
|
list-style: decimal outside
|
||||||
margin: 1em 2em
|
margin-left: 2em
|
||||||
|
margin-right: 2em
|
||||||
|
margin-top: 1em
|
||||||
ul
|
ul
|
||||||
list-style: disc outside
|
list-style: disc outside
|
||||||
margin: 1em 2em
|
margin-left: 2em
|
||||||
|
margin-right: 2em
|
||||||
|
margin-top: 1em
|
||||||
ul
|
ul
|
||||||
list-style-type: circle
|
list-style-type: circle
|
||||||
margin-top: 0.5em
|
margin-top: 0.5em
|
||||||
ul
|
ul
|
||||||
list-style-type: square
|
list-style-type: square
|
||||||
blockquote
|
// Sizes
|
||||||
background: $background
|
&.is-medium
|
||||||
border-left: 5px solid $border
|
font-size: $size-5
|
||||||
padding: 1.5em
|
code
|
||||||
&:not(:last-child)
|
font-size: $size-6
|
||||||
margin-bottom: 1em
|
&.is-large
|
||||||
|
font-size: $size-4
|
||||||
|
code
|
||||||
|
font-size: $size-5
|
||||||
|
|||||||
@@ -7,9 +7,19 @@ html
|
|||||||
overflow-x: hidden
|
overflow-x: hidden
|
||||||
overflow-y: scroll
|
overflow-y: scroll
|
||||||
text-rendering: optimizeLegibility
|
text-rendering: optimizeLegibility
|
||||||
&.has-modal-open
|
// Modifiers
|
||||||
|
&.has-modal
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
|
|
||||||
|
article,
|
||||||
|
aside,
|
||||||
|
figure,
|
||||||
|
footer,
|
||||||
|
header,
|
||||||
|
hgroup,
|
||||||
|
section
|
||||||
|
display: block
|
||||||
|
|
||||||
body,
|
body,
|
||||||
button,
|
button,
|
||||||
input,
|
input,
|
||||||
@@ -21,7 +31,7 @@ code,
|
|||||||
pre
|
pre
|
||||||
-moz-osx-font-smoothing: auto
|
-moz-osx-font-smoothing: auto
|
||||||
-webkit-font-smoothing: auto
|
-webkit-font-smoothing: auto
|
||||||
font-family: monospace
|
font-family: $family-code
|
||||||
line-height: 1.25
|
line-height: 1.25
|
||||||
|
|
||||||
body
|
body
|
||||||
@@ -29,6 +39,8 @@ body
|
|||||||
font-size: 1rem
|
font-size: 1rem
|
||||||
line-height: 1.428571428571429
|
line-height: 1.428571428571429
|
||||||
|
|
||||||
|
// Inline
|
||||||
|
|
||||||
a
|
a
|
||||||
color: $link
|
color: $link
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
@@ -61,14 +73,7 @@ small
|
|||||||
strong
|
strong
|
||||||
color: $text-strong
|
color: $text-strong
|
||||||
|
|
||||||
article,
|
// Block
|
||||||
aside,
|
|
||||||
figure,
|
|
||||||
footer,
|
|
||||||
header,
|
|
||||||
hgroup,
|
|
||||||
section
|
|
||||||
display: block
|
|
||||||
|
|
||||||
pre
|
pre
|
||||||
background: $pre-background
|
background: $pre-background
|
||||||
@@ -84,21 +89,25 @@ pre
|
|||||||
|
|
||||||
table
|
table
|
||||||
width: 100%
|
width: 100%
|
||||||
th,
|
td,
|
||||||
td
|
th
|
||||||
text-align: left
|
text-align: left
|
||||||
vertical-align: top
|
vertical-align: top
|
||||||
th
|
th
|
||||||
color: $text-strong
|
color: $text-strong
|
||||||
|
|
||||||
.block:not(:last-child)
|
// Classes
|
||||||
margin-bottom: 20px
|
|
||||||
|
.block
|
||||||
|
&:not(:last-child)
|
||||||
|
margin-bottom: 20px
|
||||||
|
|
||||||
.container
|
.container
|
||||||
position: relative
|
position: relative
|
||||||
+desktop
|
+desktop
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
max-width: 960px
|
max-width: 960px
|
||||||
|
// Modifiers
|
||||||
&.is-fluid
|
&.is-fluid
|
||||||
margin: 0 20px
|
margin: 0 20px
|
||||||
max-width: none
|
max-width: none
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
.card
|
.card
|
||||||
background: white
|
background: white
|
||||||
box-shadow: 0 2px 3px rgba(black, 0.1), 0 0 0 1px rgba(black, 0.1)
|
box-shadow: 0 2px 3px rgba(black, 0.1), 0 0 0 1px rgba(black, 0.1)
|
||||||
|
color: $text
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
position: relative
|
position: relative
|
||||||
width: 300px
|
width: 300px
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
justify-content: center
|
justify-content: center
|
||||||
&.is-mobile
|
&.is-mobile
|
||||||
display: flex
|
display: flex
|
||||||
&.has-no-gap
|
&.is-gapless
|
||||||
margin-left: 0
|
margin-left: 0
|
||||||
margin-right: 0
|
margin-right: 0
|
||||||
&:not(:last-child)
|
&:not(:last-child)
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ $control-active-border: $link
|
|||||||
// Typography
|
// Typography
|
||||||
|
|
||||||
$family-primary: $family-sans-serif
|
$family-primary: $family-sans-serif
|
||||||
|
$family-code: $family-monospace
|
||||||
|
|
||||||
$size-small: $size-7
|
$size-small: $size-7
|
||||||
$size-normal: $size-6
|
$size-normal: $size-6
|
||||||
|
|||||||
@@ -65,6 +65,8 @@
|
|||||||
color: $color-invert
|
color: $color-invert
|
||||||
&:hover
|
&:hover
|
||||||
background: rgba(black, 0.05)
|
background: rgba(black, 0.05)
|
||||||
|
border-color: $color-invert
|
||||||
|
color: $color-invert
|
||||||
&.is-loading
|
&.is-loading
|
||||||
&:after
|
&:after
|
||||||
border-color: transparent transparent $color-invert $color-invert !important
|
border-color: transparent transparent $color-invert $color-invert !important
|
||||||
|
|||||||
@@ -10,8 +10,10 @@
|
|||||||
align-items: stretch
|
align-items: stretch
|
||||||
display: flex
|
display: flex
|
||||||
width: 100%
|
width: 100%
|
||||||
|
// Modifiers
|
||||||
&.has-shadow
|
&.has-shadow
|
||||||
box-shadow: 0 1px 2px rgba(black, 0.1)
|
box-shadow: 0 1px 2px rgba(black, 0.1)
|
||||||
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
.container
|
.container
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
@@ -23,6 +25,7 @@
|
|||||||
position: absolute
|
position: absolute
|
||||||
right: 0
|
right: 0
|
||||||
top: 0
|
top: 0
|
||||||
|
// Responsiveness
|
||||||
+tablet
|
+tablet
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
@@ -32,20 +35,21 @@
|
|||||||
align-items: center
|
align-items: center
|
||||||
display: flex
|
display: flex
|
||||||
padding: 10px
|
padding: 10px
|
||||||
img
|
|
||||||
max-height: 24px
|
|
||||||
a
|
a
|
||||||
flex-grow: 1
|
flex-grow: 1
|
||||||
|
img
|
||||||
|
max-height: 24px
|
||||||
|
.button + .button
|
||||||
|
margin-left: 10px
|
||||||
.fa
|
.fa
|
||||||
font-size: 21px
|
font-size: 21px
|
||||||
line-height: 24px
|
line-height: 24px
|
||||||
.button + .button
|
|
||||||
margin-left: 10px
|
|
||||||
.tag
|
.tag
|
||||||
&:first-child
|
&:first-child
|
||||||
margin-right: 5px
|
margin-right: 5px
|
||||||
&:last-child
|
&:last-child
|
||||||
margin-left: 5px
|
margin-left: 5px
|
||||||
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
text-align: left
|
text-align: left
|
||||||
|
|
||||||
@@ -54,6 +58,7 @@ a.header-item
|
|||||||
color: $text
|
color: $text
|
||||||
&:hover
|
&:hover
|
||||||
color: $link-hover
|
color: $link-hover
|
||||||
|
// Modifiers
|
||||||
&.is-active
|
&.is-active
|
||||||
color: $link-active
|
color: $link-active
|
||||||
|
|
||||||
@@ -74,6 +79,7 @@ a.header-item
|
|||||||
padding: 13px 15px
|
padding: 13px 15px
|
||||||
&:hover
|
&:hover
|
||||||
border-bottom: 1px solid $link
|
border-bottom: 1px solid $link
|
||||||
|
// Modifiers
|
||||||
&.is-active
|
&.is-active
|
||||||
border-bottom: 3px solid $link
|
border-bottom: 3px solid $link
|
||||||
color: $link
|
color: $link
|
||||||
@@ -87,19 +93,19 @@ a.header-item
|
|||||||
overflow: hidden
|
overflow: hidden
|
||||||
overflow-x: auto
|
overflow-x: auto
|
||||||
white-space: nowrap
|
white-space: nowrap
|
||||||
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
height: $header-height
|
height: $header-height
|
||||||
+desktop
|
+desktop
|
||||||
.header-item:first-child
|
margin-left: -10px
|
||||||
padding-left: 0
|
|
||||||
|
|
||||||
.header-right
|
.header-right
|
||||||
align-items: stretch
|
align-items: stretch
|
||||||
|
// Responsiveness
|
||||||
+tablet
|
+tablet
|
||||||
display: flex
|
display: flex
|
||||||
+desktop
|
+desktop
|
||||||
.header-item:last-child
|
margin-right: -10px
|
||||||
padding-right: 0
|
|
||||||
|
|
||||||
.header-full
|
.header-full
|
||||||
align-items: stretch
|
align-items: stretch
|
||||||
@@ -120,12 +126,14 @@ a.header-item
|
|||||||
width: 100%
|
width: 100%
|
||||||
|
|
||||||
.header-menu
|
.header-menu
|
||||||
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
box-shadow: 0 4px 7px rgba(black, 0.1)
|
box-shadow: 0 4px 7px rgba(black, 0.1)
|
||||||
display: none
|
display: none
|
||||||
.header-item
|
.header-item
|
||||||
border-top: 1px solid rgba($border, 0.5)
|
border-top: 1px solid rgba($border, 0.5)
|
||||||
padding: 10px
|
padding: 10px
|
||||||
|
// Modifiers
|
||||||
&.is-active
|
&.is-active
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
.hero-video
|
.hero-video
|
||||||
+overlay
|
+overlay
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
&.is-transparent
|
|
||||||
opacity: 0.3
|
|
||||||
video
|
video
|
||||||
left: 50%
|
left: 50%
|
||||||
min-height: 100%
|
min-height: 100%
|
||||||
@@ -10,16 +8,22 @@
|
|||||||
position: absolute
|
position: absolute
|
||||||
top: 50%
|
top: 50%
|
||||||
transform: translate3d(-50%, -50%, 0)
|
transform: translate3d(-50%, -50%, 0)
|
||||||
|
// Modifiers
|
||||||
|
&.is-transparent
|
||||||
|
opacity: 0.3
|
||||||
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
.hero-content
|
.hero-content
|
||||||
padding: 40px 20px
|
padding: 40px 20px
|
||||||
|
// Responsiveness
|
||||||
+desktop
|
+desktop
|
||||||
padding: 40px 0
|
padding: 40px 0
|
||||||
|
|
||||||
.hero-buttons
|
.hero-buttons
|
||||||
margin-top: 20px
|
margin-top: 20px
|
||||||
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
.button
|
.button
|
||||||
display: block
|
display: block
|
||||||
@@ -42,9 +46,11 @@
|
|||||||
border: none
|
border: none
|
||||||
ul
|
ul
|
||||||
border-bottom: none
|
border-bottom: none
|
||||||
|
// Modifiers
|
||||||
&.is-boxed
|
&.is-boxed
|
||||||
a
|
a
|
||||||
padding: 8px 15px
|
padding: 8px 15px
|
||||||
|
// Colors
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
$color-invert: nth($pair, 2)
|
$color-invert: nth($pair, 2)
|
||||||
@@ -88,10 +94,12 @@
|
|||||||
&:hover
|
&:hover
|
||||||
background: $color-invert
|
background: $color-invert
|
||||||
color: $color
|
color: $color
|
||||||
|
// Modifiers
|
||||||
&.is-bold
|
&.is-bold
|
||||||
$gradient-top-left: darken(saturate(adjust-hue($color, -10deg), 10%), 10%)
|
$gradient-top-left: darken(saturate(adjust-hue($color, -10deg), 10%), 10%)
|
||||||
$gradient-bottom-right: lighten(saturate(adjust-hue($color, 10deg), 5%), 5%)
|
$gradient-bottom-right: lighten(saturate(adjust-hue($color, 10deg), 5%), 5%)
|
||||||
background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%)
|
background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%)
|
||||||
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
.header-toggle
|
.header-toggle
|
||||||
span
|
span
|
||||||
@@ -104,28 +112,21 @@
|
|||||||
.header-menu
|
.header-menu
|
||||||
.header-item
|
.header-item
|
||||||
border-top-color: rgba($color-invert, 0.2)
|
border-top-color: rgba($color-invert, 0.2)
|
||||||
|
// Sizes
|
||||||
&.is-fullheight,
|
&.is-fullheight,
|
||||||
&.is-large
|
&.is-large
|
||||||
|
// Responsiveness
|
||||||
+tablet
|
+tablet
|
||||||
.tabs
|
.tabs
|
||||||
font-size: $size-medium
|
font-size: $size-medium
|
||||||
&.is-medium
|
&.is-medium
|
||||||
|
// Responsiveness
|
||||||
+tablet
|
+tablet
|
||||||
.hero-content
|
.hero-content
|
||||||
padding: 120px 20px
|
padding: 120px 20px
|
||||||
+desktop
|
+desktop
|
||||||
.hero-content
|
.hero-content
|
||||||
padding: 120px 0
|
padding: 120px 0
|
||||||
&.is-large
|
|
||||||
.tabs
|
|
||||||
a
|
|
||||||
padding: 10px 15px
|
|
||||||
+tablet
|
|
||||||
.hero-content
|
|
||||||
padding: 240px 20px
|
|
||||||
+desktop
|
|
||||||
.hero-content
|
|
||||||
padding: 240px 0
|
|
||||||
&.is-fullheight
|
&.is-fullheight
|
||||||
align-items: stretch
|
align-items: stretch
|
||||||
display: flex
|
display: flex
|
||||||
@@ -140,3 +141,14 @@
|
|||||||
flex: 1
|
flex: 1
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
justify-content: center
|
justify-content: center
|
||||||
|
&.is-large
|
||||||
|
.tabs
|
||||||
|
a
|
||||||
|
padding: 10px 15px
|
||||||
|
// Responsiveness
|
||||||
|
+tablet
|
||||||
|
.hero-content
|
||||||
|
padding: 240px 20px
|
||||||
|
+desktop
|
||||||
|
.hero-content
|
||||||
|
padding: 240px 0
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
padding: 40px 20px
|
padding: 40px 20px
|
||||||
& + .section
|
& + .section
|
||||||
border-top: 1px solid rgba($border, 0.5)
|
border-top: 1px solid rgba($border, 0.5)
|
||||||
|
// Responsiveness
|
||||||
+desktop
|
+desktop
|
||||||
padding: 40px 0
|
padding: 40px 0
|
||||||
|
// Sizes
|
||||||
&.is-medium
|
&.is-medium
|
||||||
padding: 120px 0
|
padding: 120px 0
|
||||||
&.is-large
|
&.is-large
|
||||||
|
|||||||
Reference in New Issue
Block a user