mirror of
https://github.com/jgthms/bulma
synced 2026-03-22 21:14:30 -07:00
Fix components code style
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
* `.is-text-*` renamed to `.has-text-*`
|
* `.is-text-*` renamed to `.has-text-*`
|
||||||
* `.is-gapless` renamed to `.has-no-gap`
|
* `.is-gapless` renamed to `.has-no-gap`
|
||||||
* `.is-marginless` renamed to `.has-no-margin`
|
* removed `.is-fullwidth` helper
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|||||||
@@ -19,11 +19,6 @@
|
|||||||
.is-overlay
|
.is-overlay
|
||||||
+overlay
|
+overlay
|
||||||
|
|
||||||
// Size
|
|
||||||
|
|
||||||
.is-fullwidth
|
|
||||||
width: 100%
|
|
||||||
|
|
||||||
// Text
|
// Text
|
||||||
|
|
||||||
.has-text-centered
|
.has-text-centered
|
||||||
@@ -55,12 +50,11 @@
|
|||||||
|
|
||||||
// Other
|
// Other
|
||||||
|
|
||||||
.has-no-margin
|
|
||||||
margin: 0 !important
|
|
||||||
|
|
||||||
.is-disabled
|
.is-disabled
|
||||||
pointer-events: none
|
pointer-events: none
|
||||||
|
|
||||||
|
.is-marginless
|
||||||
|
margin: 0 !important
|
||||||
|
|
||||||
.is-unselectable
|
.is-unselectable
|
||||||
+unselectable
|
+unselectable
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,8 @@
|
|||||||
width: 300px
|
width: 300px
|
||||||
.media:not(:last-child)
|
.media:not(:last-child)
|
||||||
margin-bottom: 10px
|
margin-bottom: 10px
|
||||||
&.is-rounded
|
// Modifiers
|
||||||
border-radius: 5px
|
|
||||||
&.is-fullwidth
|
&.is-fullwidth
|
||||||
width: 100%
|
width: 100%
|
||||||
|
&.is-rounded
|
||||||
|
border-radius: 5px
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
padding: 4px 8px
|
padding: 4px 8px
|
||||||
text-align: center
|
text-align: center
|
||||||
vertical-align: top
|
vertical-align: top
|
||||||
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
margin-bottom: 10px
|
margin-bottom: 10px
|
||||||
+tablet
|
+tablet
|
||||||
@@ -50,10 +51,12 @@
|
|||||||
border-top: 1px solid rgba($border, 0.5)
|
border-top: 1px solid rgba($border, 0.5)
|
||||||
margin-top: 10px
|
margin-top: 10px
|
||||||
padding-top: 10px
|
padding-top: 10px
|
||||||
|
// Sizes
|
||||||
&.is-large
|
&.is-large
|
||||||
& + .media
|
& + .media
|
||||||
margin-top: 20px
|
margin-top: 20px
|
||||||
padding-top: 20px
|
padding-top: 20px
|
||||||
|
// Responsiveness
|
||||||
+tablet
|
+tablet
|
||||||
&.is-large
|
&.is-large
|
||||||
.media-number
|
.media-number
|
||||||
|
|||||||
@@ -12,13 +12,15 @@
|
|||||||
&:hover
|
&:hover
|
||||||
background: $background
|
background: $background
|
||||||
color: $link
|
color: $link
|
||||||
|
// Modifiers
|
||||||
&.is-active
|
&.is-active
|
||||||
background: $link
|
background: $link
|
||||||
color: $link-invert
|
color: $link-invert
|
||||||
li ul
|
li
|
||||||
border-left: 1px solid $border
|
ul
|
||||||
margin: 10px
|
border-left: 1px solid $border
|
||||||
padding-left: 10px
|
margin: 10px
|
||||||
|
padding-left: 10px
|
||||||
|
|
||||||
.menu-label
|
.menu-label
|
||||||
color: $text-light
|
color: $text-light
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
overflow: auto
|
overflow: auto
|
||||||
position: relative
|
position: relative
|
||||||
width: 100%
|
width: 100%
|
||||||
|
// Responsiveness
|
||||||
+tablet
|
+tablet
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
max-height: calc(100vh - 40px)
|
max-height: calc(100vh - 40px)
|
||||||
@@ -30,5 +31,6 @@
|
|||||||
overflow: hidden
|
overflow: hidden
|
||||||
position: fixed
|
position: fixed
|
||||||
z-index: 1986
|
z-index: 1986
|
||||||
|
// Modifiers
|
||||||
&.is-active
|
&.is-active
|
||||||
display: flex
|
display: flex
|
||||||
|
|||||||
@@ -2,34 +2,22 @@
|
|||||||
.title,
|
.title,
|
||||||
.subtitle
|
.subtitle
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
&:not(:last-child)
|
&:not(:last-child)
|
||||||
margin-bottom: 10px
|
margin-bottom: 10px
|
||||||
|
|
||||||
.navbar
|
|
||||||
@extend .block
|
|
||||||
code
|
|
||||||
border-radius: $radius
|
|
||||||
img
|
|
||||||
display: inline-block
|
|
||||||
vertical-align: top
|
|
||||||
+tablet
|
|
||||||
align-items: center
|
|
||||||
display: flex
|
|
||||||
justify-content: space-between
|
|
||||||
& > .navbar-item
|
|
||||||
&:not(.is-narrow)
|
|
||||||
flex: 1
|
|
||||||
|
|
||||||
.navbar-left,
|
.navbar-left,
|
||||||
.navbar-right
|
.navbar-right
|
||||||
.navbar-item
|
.navbar-item
|
||||||
&.is-flexible
|
|
||||||
flex: 1
|
|
||||||
&:not(:last-child)
|
&:not(:last-child)
|
||||||
margin-right: 10px
|
margin-right: 10px
|
||||||
|
// Modifiers
|
||||||
|
&.is-flexible
|
||||||
|
flex: 1
|
||||||
|
|
||||||
.navbar-left
|
.navbar-left
|
||||||
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
& + .navbar-right
|
& + .navbar-right
|
||||||
margin-top: 20px
|
margin-top: 20px
|
||||||
@@ -38,7 +26,24 @@
|
|||||||
display: flex
|
display: flex
|
||||||
|
|
||||||
.navbar-right
|
.navbar-right
|
||||||
|
// Responsiveness
|
||||||
+tablet
|
+tablet
|
||||||
align-items: center
|
align-items: center
|
||||||
display: flex
|
display: flex
|
||||||
justify-content: flex-end
|
justify-content: flex-end
|
||||||
|
|
||||||
|
.navbar
|
||||||
|
@extend .block
|
||||||
|
code
|
||||||
|
border-radius: $radius
|
||||||
|
img
|
||||||
|
display: inline-block
|
||||||
|
vertical-align: top
|
||||||
|
// Responsiveness
|
||||||
|
+tablet
|
||||||
|
align-items: center
|
||||||
|
display: flex
|
||||||
|
justify-content: space-between
|
||||||
|
& > .navbar-item
|
||||||
|
&:not(.is-narrow)
|
||||||
|
flex: 1
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
display: block
|
display: block
|
||||||
min-width: 32px
|
min-width: 32px
|
||||||
padding: 3px 8px
|
padding: 3px 8px
|
||||||
|
// Modifiers
|
||||||
&.is-active
|
&.is-active
|
||||||
background: $link
|
background: $link
|
||||||
border-color: $link
|
border-color: $link
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
display: flex
|
display: flex
|
||||||
flex: 1
|
flex: 1
|
||||||
justify-content: center
|
justify-content: center
|
||||||
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
& > a
|
& > a
|
||||||
|
|||||||
@@ -27,47 +27,26 @@
|
|||||||
font-size: $size-small
|
font-size: $size-small
|
||||||
padding: 5px 10px 0
|
padding: 5px 10px 0
|
||||||
justify-content: center
|
justify-content: center
|
||||||
&:not(:last-child)
|
|
||||||
border-bottom: 1px solid $border
|
|
||||||
a
|
a
|
||||||
border-bottom: 1px solid $border
|
border-bottom: 1px solid $border
|
||||||
margin-bottom: -1px
|
margin-bottom: -1px
|
||||||
padding: 5px
|
padding: 5px
|
||||||
|
// Modifiers
|
||||||
&.is-active
|
&.is-active
|
||||||
border-bottom-color: $link-active-border
|
border-bottom-color: $link-active-border
|
||||||
color: $link-active
|
color: $link-active
|
||||||
|
&:not(:last-child)
|
||||||
|
border-bottom: 1px solid $border
|
||||||
|
|
||||||
.panel-block
|
.panel-block
|
||||||
color: $text-strong
|
color: $text-strong
|
||||||
display: block
|
display: block
|
||||||
line-height: 16px
|
line-height: 16px
|
||||||
padding: 10px
|
padding: 10px
|
||||||
|
&:hover
|
||||||
|
background: $background
|
||||||
&:not(:last-child)
|
&:not(:last-child)
|
||||||
border-bottom: 1px solid $border
|
border-bottom: 1px solid $border
|
||||||
.checkbox
|
|
||||||
border: 1px solid transparent
|
|
||||||
border-radius: $radius
|
|
||||||
display: block
|
|
||||||
padding: 8px
|
|
||||||
padding-left: 32px
|
|
||||||
input
|
|
||||||
left: 9px
|
|
||||||
top: 9px
|
|
||||||
&:hover
|
|
||||||
border-color: $link
|
|
||||||
|
|
||||||
a.panel-block:hover
|
|
||||||
background: $background
|
|
||||||
|
|
||||||
.panel-checkbox
|
|
||||||
@extend .checkbox
|
|
||||||
display: block
|
|
||||||
padding: 9px 10px 9px 30px
|
|
||||||
&:not(:last-child)
|
|
||||||
border-bottom: 1px solid $border
|
|
||||||
input
|
|
||||||
left: 8px
|
|
||||||
top: 10px
|
|
||||||
|
|
||||||
.panel
|
.panel
|
||||||
border: 1px solid $border
|
border: 1px solid $border
|
||||||
|
|||||||
@@ -3,23 +3,13 @@
|
|||||||
color: $text-strong
|
color: $text-strong
|
||||||
margin-bottom: 20px
|
margin-bottom: 20px
|
||||||
width: 100%
|
width: 100%
|
||||||
th,
|
td,
|
||||||
td
|
th
|
||||||
border: 1px solid $border
|
border: 1px solid $border
|
||||||
border-width: 0 0 1px
|
border-width: 0 0 1px
|
||||||
padding: 8px 10px
|
padding: 8px 10px
|
||||||
vertical-align: top
|
vertical-align: top
|
||||||
&.table-narrow
|
// Modifiers
|
||||||
white-space: nowrap
|
|
||||||
width: 1%
|
|
||||||
&.table-link
|
|
||||||
padding: 0
|
|
||||||
& > a
|
|
||||||
display: block
|
|
||||||
padding: 8px 10px
|
|
||||||
&:hover
|
|
||||||
background: $link
|
|
||||||
color: $link-invert
|
|
||||||
&.table-icon
|
&.table-icon
|
||||||
padding: 5px
|
padding: 5px
|
||||||
text-align: center
|
text-align: center
|
||||||
@@ -31,49 +21,69 @@
|
|||||||
padding: 0
|
padding: 0
|
||||||
& > a
|
& > a
|
||||||
padding: 5px
|
padding: 5px
|
||||||
|
&.table-link
|
||||||
|
padding: 0
|
||||||
|
& > a
|
||||||
|
display: block
|
||||||
|
padding: 8px 10px
|
||||||
|
&:hover
|
||||||
|
background: $link
|
||||||
|
color: $link-invert
|
||||||
|
&.table-narrow
|
||||||
|
white-space: nowrap
|
||||||
|
width: 1%
|
||||||
th
|
th
|
||||||
color: $text-strong
|
color: $text-strong
|
||||||
text-align: left
|
text-align: left
|
||||||
tr
|
tr
|
||||||
&:hover
|
&:hover
|
||||||
background: rgba($background, 0.5)
|
background: $background
|
||||||
color: $text-strong
|
color: $text-strong
|
||||||
&:last-child td
|
|
||||||
border-bottom-width: 0
|
|
||||||
thead
|
thead
|
||||||
th,
|
td,
|
||||||
td
|
th
|
||||||
border-width: 0 0 2px
|
border-width: 0 0 2px
|
||||||
color: $text-light
|
color: $text-light
|
||||||
|
tbody
|
||||||
|
tr
|
||||||
|
&:last-child
|
||||||
|
td,
|
||||||
|
th
|
||||||
|
border-bottom-width: 0
|
||||||
tfoot
|
tfoot
|
||||||
th,
|
td,
|
||||||
td
|
th
|
||||||
border-width: 2px 0 0
|
border-width: 2px 0 0
|
||||||
color: $text-light
|
color: $text-light
|
||||||
|
// Modifiers
|
||||||
&.is-bordered
|
&.is-bordered
|
||||||
th,
|
td,
|
||||||
td
|
th
|
||||||
border-width: 1px
|
border-width: 1px
|
||||||
tr
|
tr
|
||||||
&:last-child td
|
&:last-child
|
||||||
border-bottom-width: 1px
|
td,
|
||||||
|
th
|
||||||
|
border-bottom-width: 1px
|
||||||
&.is-narrow
|
&.is-narrow
|
||||||
th,
|
td,
|
||||||
td
|
th
|
||||||
padding: 5px 10px
|
padding: 5px 10px
|
||||||
&.table-link
|
// Modifiers
|
||||||
padding: 0
|
|
||||||
& > a
|
|
||||||
padding: 5px 10px
|
|
||||||
&.table-icon
|
&.table-icon
|
||||||
padding: 2px
|
padding: 2px
|
||||||
&.table-link
|
&.table-link
|
||||||
padding: 0
|
padding: 0
|
||||||
& > a
|
& > a
|
||||||
padding: 2px
|
padding: 2px
|
||||||
|
&.table-link
|
||||||
|
padding: 0
|
||||||
|
& > a
|
||||||
|
padding: 5px 10px
|
||||||
&.is-striped
|
&.is-striped
|
||||||
tbody
|
tbody
|
||||||
tr:nth-child(2n)
|
tr
|
||||||
background: rgba($background, 0.5)
|
&:nth-child(2n)
|
||||||
&:hover
|
|
||||||
background: $background
|
background: $background
|
||||||
|
&:hover
|
||||||
|
background: $border
|
||||||
|
|||||||
@@ -4,11 +4,6 @@
|
|||||||
overflow: hidden
|
overflow: hidden
|
||||||
overflow-x: auto
|
overflow-x: auto
|
||||||
white-space: nowrap
|
white-space: nowrap
|
||||||
.fa
|
|
||||||
font-size: 14px
|
|
||||||
line-height: 20px
|
|
||||||
margin: 2px -2px
|
|
||||||
width: 20px
|
|
||||||
a
|
a
|
||||||
border-bottom: 1px solid $border
|
border-bottom: 1px solid $border
|
||||||
color: $text
|
color: $text
|
||||||
@@ -24,6 +19,7 @@
|
|||||||
vertical-align: top
|
vertical-align: top
|
||||||
& + li
|
& + li
|
||||||
margin-left: 20px
|
margin-left: 20px
|
||||||
|
// Modifiers
|
||||||
&.is-active
|
&.is-active
|
||||||
a
|
a
|
||||||
border-bottom-color: $link
|
border-bottom-color: $link
|
||||||
@@ -31,18 +27,12 @@
|
|||||||
ul
|
ul
|
||||||
border-bottom: 1px solid $border
|
border-bottom: 1px solid $border
|
||||||
display: flex
|
display: flex
|
||||||
&.is-centered
|
.fa
|
||||||
a
|
font-size: 14px
|
||||||
padding: 5px 10px
|
line-height: 20px
|
||||||
li
|
margin: 2px -2px
|
||||||
& + li
|
width: 20px
|
||||||
margin-left: 0
|
// Modifiers
|
||||||
ul
|
|
||||||
justify-content: center
|
|
||||||
text-align: center
|
|
||||||
&.is-right
|
|
||||||
ul
|
|
||||||
justify-content: flex-end
|
|
||||||
&.is-boxed
|
&.is-boxed
|
||||||
a
|
a
|
||||||
border: 1px solid transparent
|
border: 1px solid transparent
|
||||||
@@ -54,16 +44,38 @@
|
|||||||
li
|
li
|
||||||
& + li
|
& + li
|
||||||
margin-left: 5px
|
margin-left: 5px
|
||||||
|
// Modifiers
|
||||||
&.is-active
|
&.is-active
|
||||||
a
|
a
|
||||||
background: white
|
background: white
|
||||||
border-color: $border
|
border-color: $border
|
||||||
border-bottom-color: transparent
|
border-bottom-color: transparent
|
||||||
|
// Modifiers
|
||||||
&.is-centered
|
&.is-centered
|
||||||
li
|
li
|
||||||
&,
|
&,
|
||||||
& + li
|
& + li
|
||||||
margin: 0 2px
|
margin: 0 2px
|
||||||
|
&.is-centered
|
||||||
|
a
|
||||||
|
padding: 5px 10px
|
||||||
|
li
|
||||||
|
& + li
|
||||||
|
margin-left: 0
|
||||||
|
ul
|
||||||
|
justify-content: center
|
||||||
|
text-align: center
|
||||||
|
&.is-fullwidth
|
||||||
|
li
|
||||||
|
flex: 1
|
||||||
|
& + li
|
||||||
|
margin-left: 0
|
||||||
|
ul
|
||||||
|
justify-content: center
|
||||||
|
text-align: center
|
||||||
|
&.is-right
|
||||||
|
ul
|
||||||
|
justify-content: flex-end
|
||||||
&.is-toggle
|
&.is-toggle
|
||||||
a
|
a
|
||||||
border: 1px solid $border
|
border: 1px solid $border
|
||||||
@@ -81,6 +93,7 @@
|
|||||||
border-radius: $radius 0 0 $radius
|
border-radius: $radius 0 0 $radius
|
||||||
&:last-child a
|
&:last-child a
|
||||||
border-radius: 0 $radius $radius 0
|
border-radius: 0 $radius $radius 0
|
||||||
|
// Modifiers
|
||||||
&.is-active
|
&.is-active
|
||||||
a
|
a
|
||||||
background: $primary
|
background: $primary
|
||||||
@@ -89,11 +102,3 @@
|
|||||||
z-index: 1
|
z-index: 1
|
||||||
ul
|
ul
|
||||||
border-bottom: none
|
border-bottom: none
|
||||||
&.is-fullwidth
|
|
||||||
li
|
|
||||||
flex: 1
|
|
||||||
& + li
|
|
||||||
margin-left: 0
|
|
||||||
ul
|
|
||||||
justify-content: center
|
|
||||||
text-align: center
|
|
||||||
|
|||||||
Reference in New Issue
Block a user