mirror of
https://github.com/jgthms/bulma
synced 2026-03-20 20:24:30 -07:00
Add modals, Add block, Add has modifier
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
.content
|
.content
|
||||||
|
@extend .block
|
||||||
&.is-medium
|
&.is-medium
|
||||||
font-size: $size-5
|
font-size: $size-5
|
||||||
code
|
code
|
||||||
@@ -7,8 +8,6 @@
|
|||||||
font-size: $size-4
|
font-size: $size-4
|
||||||
code
|
code
|
||||||
font-size: $size-5
|
font-size: $size-5
|
||||||
&:not(:last-child)
|
|
||||||
margin-bottom: 20px
|
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ html
|
|||||||
overflow-x: hidden
|
overflow-x: hidden
|
||||||
overflow-y: scroll
|
overflow-y: scroll
|
||||||
text-rendering: optimizeLegibility
|
text-rendering: optimizeLegibility
|
||||||
|
&.has-modal-open
|
||||||
|
overflow: hidden
|
||||||
|
|
||||||
body,
|
body,
|
||||||
button,
|
button,
|
||||||
@@ -47,7 +49,6 @@ hr
|
|||||||
margin: 20px 0
|
margin: 20px 0
|
||||||
|
|
||||||
img
|
img
|
||||||
max-height: 100%
|
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
|
|
||||||
input[type="checkbox"],
|
input[type="checkbox"],
|
||||||
@@ -90,8 +91,10 @@ table
|
|||||||
th
|
th
|
||||||
color: $text-strong
|
color: $text-strong
|
||||||
|
|
||||||
|
.block:not(:last-child)
|
||||||
|
margin-bottom: 20px
|
||||||
|
|
||||||
.container
|
.container
|
||||||
margin: 0 20px
|
|
||||||
position: relative
|
position: relative
|
||||||
+desktop
|
+desktop
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
|
|||||||
@@ -1,14 +1,3 @@
|
|||||||
// Alignment
|
|
||||||
|
|
||||||
.is-centered
|
|
||||||
text-align: center
|
|
||||||
|
|
||||||
.is-left
|
|
||||||
text-align: left
|
|
||||||
|
|
||||||
.is-right
|
|
||||||
text-align: right
|
|
||||||
|
|
||||||
// Display
|
// Display
|
||||||
|
|
||||||
.is-block
|
.is-block
|
||||||
@@ -20,7 +9,7 @@
|
|||||||
.is-flex
|
.is-flex
|
||||||
display: flex
|
display: flex
|
||||||
|
|
||||||
// Pull
|
// Float
|
||||||
|
|
||||||
.is-clearfix
|
.is-clearfix
|
||||||
+clearfix
|
+clearfix
|
||||||
@@ -31,11 +20,27 @@
|
|||||||
.is-pulled-right
|
.is-pulled-right
|
||||||
float: right
|
float: right
|
||||||
|
|
||||||
|
// Overlay
|
||||||
|
|
||||||
|
.is-overlay
|
||||||
|
+overlay
|
||||||
|
|
||||||
// Size
|
// Size
|
||||||
|
|
||||||
.is-fullwidth
|
.is-fullwidth
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
||||||
|
// Text
|
||||||
|
|
||||||
|
.is-text-centered
|
||||||
|
text-align: center
|
||||||
|
|
||||||
|
.is-text-left
|
||||||
|
text-align: left
|
||||||
|
|
||||||
|
.is-text-right
|
||||||
|
text-align: right
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
|
|
||||||
.is-hidden-mobile
|
.is-hidden-mobile
|
||||||
|
|||||||
@@ -7,6 +7,4 @@
|
|||||||
@import "tabs"
|
@import "tabs"
|
||||||
@import "media"
|
@import "media"
|
||||||
@import "menu"
|
@import "menu"
|
||||||
|
@import "modal"
|
||||||
.block:not(:last-child)
|
|
||||||
margin-bottom: 20px
|
|
||||||
|
|||||||
@@ -1,14 +1,3 @@
|
|||||||
.media-image
|
|
||||||
&.is-32
|
|
||||||
width: 32px
|
|
||||||
&.is-40
|
|
||||||
width: 40px
|
|
||||||
+mobile
|
|
||||||
margin-bottom: 10px
|
|
||||||
+tablet
|
|
||||||
margin-right: 10px
|
|
||||||
width: 60px
|
|
||||||
|
|
||||||
.media-number
|
.media-number
|
||||||
background: $background
|
background: $background
|
||||||
border-radius: 290486px
|
border-radius: 290486px
|
||||||
@@ -26,25 +15,18 @@
|
|||||||
margin-right: 10px
|
margin-right: 10px
|
||||||
|
|
||||||
.media-left
|
.media-left
|
||||||
+mobile
|
margin-right: 10px
|
||||||
margin-bottom: 20px
|
|
||||||
+tablet
|
|
||||||
margin-right: 20px
|
|
||||||
|
|
||||||
.media-right
|
.media-right
|
||||||
+mobile
|
margin-left: 10px
|
||||||
margin-top: 20px
|
|
||||||
+tablet
|
|
||||||
margin-left: 20px
|
|
||||||
|
|
||||||
.media-content
|
.media-content
|
||||||
flex: 1
|
flex: 1
|
||||||
text-align: left
|
text-align: left
|
||||||
.textarea
|
|
||||||
min-height: 60px
|
|
||||||
|
|
||||||
.media
|
.media
|
||||||
align-items: flex-start
|
align-items: flex-start
|
||||||
|
display: flex
|
||||||
text-align: left
|
text-align: left
|
||||||
.content:not(:last-child)
|
.content:not(:last-child)
|
||||||
margin-bottom: 10px
|
margin-bottom: 10px
|
||||||
@@ -52,10 +34,6 @@
|
|||||||
border-top: 1px solid rgba($border, 0.5)
|
border-top: 1px solid rgba($border, 0.5)
|
||||||
display: flex
|
display: flex
|
||||||
padding-top: 10px
|
padding-top: 10px
|
||||||
.media-image
|
|
||||||
margin-bottom: 0
|
|
||||||
margin-right: 10px
|
|
||||||
width: 40px
|
|
||||||
.textarea
|
.textarea
|
||||||
+control-small
|
+control-small
|
||||||
.button
|
.button
|
||||||
@@ -77,7 +55,6 @@
|
|||||||
margin-top: 20px
|
margin-top: 20px
|
||||||
padding-top: 20px
|
padding-top: 20px
|
||||||
+tablet
|
+tablet
|
||||||
display: flex
|
|
||||||
&.is-large
|
&.is-large
|
||||||
.media-number
|
.media-number
|
||||||
margin-right: 20px
|
margin-right: 20px
|
||||||
|
|||||||
34
bulma/components/modal.sass
Normal file
34
bulma/components/modal.sass
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
.modal-background
|
||||||
|
+overlay
|
||||||
|
background: rgba(black, 0.86)
|
||||||
|
|
||||||
|
.modal-content
|
||||||
|
margin: 0 20px
|
||||||
|
max-height: calc(100vh - 160px)
|
||||||
|
overflow: auto
|
||||||
|
position: relative
|
||||||
|
width: 100%
|
||||||
|
+tablet
|
||||||
|
margin: 0 auto
|
||||||
|
max-height: calc(100vh - 40px)
|
||||||
|
width: 640px
|
||||||
|
|
||||||
|
.modal-close
|
||||||
|
@extend .delete
|
||||||
|
background: none
|
||||||
|
height: 40px
|
||||||
|
position: fixed
|
||||||
|
right: 20px
|
||||||
|
top: 20px
|
||||||
|
width: 40px
|
||||||
|
|
||||||
|
.modal
|
||||||
|
+overlay
|
||||||
|
align-items: center
|
||||||
|
display: none
|
||||||
|
justify-content: center
|
||||||
|
overflow: hidden
|
||||||
|
position: fixed
|
||||||
|
z-index: 1986
|
||||||
|
&.is-active
|
||||||
|
display: flex
|
||||||
@@ -7,8 +7,7 @@
|
|||||||
margin-bottom: 10px
|
margin-bottom: 10px
|
||||||
|
|
||||||
.navbar
|
.navbar
|
||||||
&:not(:last-child)
|
@extend .block
|
||||||
margin-bottom: 20px
|
|
||||||
code
|
code
|
||||||
border-radius: $radius
|
border-radius: $radius
|
||||||
img
|
img
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
.tabs
|
.tabs
|
||||||
|
@extend .block
|
||||||
line-height: 24px
|
line-height: 24px
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
overflow-x: auto
|
overflow-x: auto
|
||||||
white-space: nowrap
|
white-space: nowrap
|
||||||
&:not(:last-child)
|
|
||||||
margin-bottom: 20px
|
|
||||||
.fa
|
.fa
|
||||||
font-size: 14px
|
font-size: 14px
|
||||||
line-height: 20px
|
line-height: 20px
|
||||||
|
|||||||
@@ -182,7 +182,7 @@
|
|||||||
top: 8px
|
top: 8px
|
||||||
&:not(:last-child)
|
&:not(:last-child)
|
||||||
margin-bottom: 10px
|
margin-bottom: 10px
|
||||||
&.is-withicon
|
&.has-icon
|
||||||
& > .fa
|
& > .fa
|
||||||
+fa(14px, 20px)
|
+fa(14px, 20px)
|
||||||
color: $text-light
|
color: $text-light
|
||||||
|
|||||||
@@ -7,6 +7,12 @@
|
|||||||
@import "messages"
|
@import "messages"
|
||||||
@import "notifications"
|
@import "notifications"
|
||||||
|
|
||||||
|
.box
|
||||||
|
background: white
|
||||||
|
border-radius: 5px
|
||||||
|
box-shadow: 0 2px 3px rgba(black, 0.1), 0 0 0 1px rgba(black, 0.1)
|
||||||
|
padding: 20px
|
||||||
|
|
||||||
.delete
|
.delete
|
||||||
+unselectable
|
+unselectable
|
||||||
-moz-appearance: none
|
-moz-appearance: none
|
||||||
@@ -26,24 +32,27 @@
|
|||||||
content: ""
|
content: ""
|
||||||
display: block
|
display: block
|
||||||
height: 2px
|
height: 2px
|
||||||
left: 6px
|
left: 50%
|
||||||
|
margin-left: -25%
|
||||||
|
margin-top: -1px
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 11px
|
top: 50%
|
||||||
width: 12px
|
width: 50%
|
||||||
&:before
|
&:before
|
||||||
transform: rotate(45deg)
|
transform: rotate(45deg)
|
||||||
&:after
|
&:after
|
||||||
transform: rotate(-45deg)
|
transform: rotate(-45deg)
|
||||||
&:hover
|
&:hover
|
||||||
background: rgba(black, 0.5)
|
background: $red
|
||||||
&.is-small
|
&.is-small
|
||||||
height: 16px
|
height: 16px
|
||||||
width: 16px
|
width: 16px
|
||||||
&:before,
|
&.is-medium
|
||||||
&:after
|
height: 32px
|
||||||
left: 4px
|
width: 32px
|
||||||
top: 7px
|
&.is-large
|
||||||
width: 8px
|
height: 40px
|
||||||
|
width: 40px
|
||||||
|
|
||||||
.icon
|
.icon
|
||||||
+fa(21px, 24px)
|
+fa(21px, 24px)
|
||||||
@@ -107,13 +116,12 @@
|
|||||||
text-transform: uppercase
|
text-transform: uppercase
|
||||||
|
|
||||||
.highlight
|
.highlight
|
||||||
|
@extend .block
|
||||||
font-size: 12px
|
font-size: 12px
|
||||||
font-weight: normal
|
font-weight: normal
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
padding: 0
|
padding: 0
|
||||||
&:not(:last-child)
|
|
||||||
margin-bottom: 20px
|
|
||||||
pre
|
pre
|
||||||
overflow: auto
|
overflow: auto
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
|
|||||||
@@ -19,10 +19,9 @@
|
|||||||
border-top: none
|
border-top: none
|
||||||
|
|
||||||
.message
|
.message
|
||||||
|
@extend .block
|
||||||
background: $background
|
background: $background
|
||||||
border-radius: $radius
|
border-radius: $radius
|
||||||
&:not(:last-child)
|
|
||||||
margin-bottom: 20px
|
|
||||||
@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)
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
.notification
|
.notification
|
||||||
|
@extend .block
|
||||||
+clearfix
|
+clearfix
|
||||||
background: $background
|
background: $background
|
||||||
border-radius: $radius
|
border-radius: $radius
|
||||||
padding: 16px 20px
|
padding: 16px 20px
|
||||||
position: relative
|
position: relative
|
||||||
&:not(:last-child)
|
|
||||||
margin-bottom: 20px
|
|
||||||
.title
|
.title
|
||||||
color: inherit
|
color: inherit
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $colors
|
||||||
@@ -15,6 +14,10 @@
|
|||||||
background: $color
|
background: $color
|
||||||
color: $color-invert
|
color: $color-invert
|
||||||
.delete
|
.delete
|
||||||
|
background: rgba(black, 0.2)
|
||||||
border-radius: 0 $radius
|
border-radius: 0 $radius
|
||||||
float: right
|
float: right
|
||||||
margin: -16px -20px 0 20px
|
margin: -16px -20px 0 20px
|
||||||
|
&:hover
|
||||||
|
background: rgba(black, 0.5)
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
.title,
|
.title,
|
||||||
.subtitle
|
.subtitle
|
||||||
|
@extend .block
|
||||||
font-weight: 300
|
font-weight: 300
|
||||||
&:not(:last-child)
|
|
||||||
margin-bottom: 20px
|
|
||||||
a
|
a
|
||||||
&:hover
|
&:hover
|
||||||
border-bottom: 1px solid
|
border-bottom: 1px solid
|
||||||
// text-decoration: underline
|
|
||||||
|
|
||||||
.title
|
.title
|
||||||
color: $text-strong
|
color: $text-strong
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
.section
|
.section
|
||||||
background: white
|
background: white
|
||||||
padding: 40px 0
|
padding: 40px 20px
|
||||||
& + .section
|
& + .section
|
||||||
border-top: 1px solid rgba($border, 0.5)
|
border-top: 1px solid rgba($border, 0.5)
|
||||||
+desktop
|
+desktop
|
||||||
|
padding: 40px 0
|
||||||
&.is-medium
|
&.is-medium
|
||||||
padding: 120px 0
|
padding: 120px 0
|
||||||
&.is-large
|
&.is-large
|
||||||
|
|||||||
Reference in New Issue
Block a user