diff --git a/docs/_data/global.json b/docs/_data/global.json index fc5f0e3e..bcc1dc61 100644 --- a/docs/_data/global.json +++ b/docs/_data/global.json @@ -1,4 +1,41 @@ { + "navbar_items": [ + { + "id": "templates", + "color": "has-text-info", + "fa_type": "fas", + "fa_icon": "fa-code", + "title": "Templates" + }, + { + "id": "videos", + "color": "has-text-success", + "fa_type": "fas", + "fa_icon": "fa-play-circle", + "title": "Videos" + }, + { + "id": "blog", + "color": "bd-has-text-rss", + "fa_type": "fas", + "fa_icon": "fa-rss", + "title": "Blog" + }, + { + "id": "expo", + "color": "bd-has-text-star", + "fa_type": "fas", + "fa_icon": "fa-star", + "title": "Expo" + }, + { + "id": "love", + "color": "has-text-danger", + "fa_type": "fas", + "fa_icon": "fa-heart", + "title": "Love" + } + ], "more_items": [ { "id": "bulma-start", diff --git a/docs/_includes/elements/improve-page.html b/docs/_includes/elements/improve-page.html new file mode 100644 index 00000000..791877a3 --- /dev/null +++ b/docs/_includes/elements/improve-page.html @@ -0,0 +1,16 @@ + + + + + + + + This page is open source. + Noticed a typo? Or something unclear? + + + Improve this page on GitHub + + + + diff --git a/docs/_includes/navbar.html b/docs/_includes/navbar.html index 4f5f3c92..08909a01 100644 --- a/docs/_includes/navbar.html +++ b/docs/_includes/navbar.html @@ -1,4 +1,4 @@ - + @@ -23,44 +23,24 @@ - + - + Documentation - - - - - Templates - - - - - - Videos - - - - - - Blog - - - - - - Expo - - - - - - Love - + + {% for item in site.data.global.navbar_items %} + + + + + {{ item.title }} + + {% endfor %} + More diff --git a/docs/_javascript/main.js b/docs/_javascript/main.js index 5bad7b56..2abf217f 100644 --- a/docs/_javascript/main.js +++ b/docs/_javascript/main.js @@ -287,23 +287,23 @@ document.addEventListener('DOMContentLoaded', () => { } } - translateHeader(window.scrollY, false); + // translateHeader(window.scrollY, false); let ticking = false; let lastY = 0; - window.addEventListener('scroll', function() { - const currentY = window.scrollY; + // window.addEventListener('scroll', function() { + // const currentY = window.scrollY; - if (!ticking) { - window.requestAnimationFrame(function() { - upOrDown(lastY, currentY); - ticking = false; - lastY = currentY; - }); - } + // if (!ticking) { + // window.requestAnimationFrame(function() { + // upOrDown(lastY, currentY); + // ticking = false; + // lastY = currentY; + // }); + // } - ticking = true; - }); + // ticking = true; + // }); }); diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index e168fb7f..fdc52d80 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -1,5 +1,5 @@ - + {% include head.html %} {% include deprecated.html %} diff --git a/docs/_layouts/documentation.html b/docs/_layouts/documentation.html index 894c1a71..6b252601 100644 --- a/docs/_layouts/documentation.html +++ b/docs/_layouts/documentation.html @@ -3,73 +3,51 @@ layout: default route: documentation --- -{% include navbar.html id="Documentation" has_container=true %} +{% include navbar.html id="Documentation" %} - - - - - - - Documentation - + + + + + + + + + + Home + + + Documentation + + + Elements + + + Button + + + + + + + + {{ page.title }} + - Everything you need to create a website with Bulma + {{ page.subtitle }} - - - {% include carbon.html %} + + + + {{ content }} - + + + + - - - - - - Overview - - - Modifiers - - - Columns - - - Layout - - - Form - - - Elements - - - Components - - - - - - - -{{ content }} - - - - - - - - - This page is open source. - Noticed a typo? Or something unclear? - - - Improve this page on GitHub - - - - +{% include elements/improve-page.html %} diff --git a/docs/_sass/global.sass b/docs/_sass/global.sass index 4f8eb321..6fe5ed58 100644 --- a/docs/_sass/global.sass +++ b/docs/_sass/global.sass @@ -3,6 +3,7 @@ svg max-width: 100% $carbon-space: 15px +$carbon-width: 300px #carboncontainer align-items: center @@ -10,8 +11,9 @@ $carbon-space: 15px justify-content: center margin-left: auto margin-right: auto - max-width: 340px + max-width: $carbon-width min-height: 120px + ($carbon-space * 2) + min-width: 280px #carbon flex-grow: 1 @@ -21,7 +23,7 @@ $carbon-space: 15px &:hover box-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px $primary +tablet - width: 340px + width: $carbon-width #carbonads font-size: 14px diff --git a/docs/_sass/main.sass b/docs/_sass/main.sass new file mode 100644 index 00000000..09a17057 --- /dev/null +++ b/docs/_sass/main.sass @@ -0,0 +1,64 @@ +.bd-main + overflow: hidden + position: relative + +// Lead + +.bd-lead + // border: 1px solid lightskyblue + position: relative + +.bd-breadcrumb + margin-bottom: 2.5rem + +.bd-header + margin-bottom: 2.5rem + .subtitle + color: $text-light + strong + color: currentColor + +// Side + +.bd-side, +.bd-side-background + background-color: $white-bis + // border: 1px solid coral + +.bd-side + position: relative + +.bd-side-background + bottom: 0 + left: 50% + position: absolute + right: 0 + top: 0 + ++touch + .bd-lead, + .bd-side + padding: 1.5rem + ++mobile + .bd-side-background + display: none + ++tablet + .bd-duo + display: flex + .bd-lead + background-color: $white + overflow: hidden + flex-grow: 1 + flex-shrink: 1 + .bd-side + flex: 0 0 300px + ++desktop + .bd-main + padding: 0 3rem + .bd-lead + padding: 3rem 3rem 3rem 0 + .bd-side + padding: 3rem 0 3rem 1.5rem diff --git a/docs/_sass/specific.sass b/docs/_sass/specific.sass index f0a7e180..f4d5b7e4 100644 --- a/docs/_sass/specific.sass +++ b/docs/_sass/specific.sass @@ -1,3 +1,28 @@ +.bd-has-text-rss + color: $rss + +.bd-has-text-star + color: $star + +$navbar-items: ("documentation": $primary, "templates": $info, "videos": $success, "blog": $rss, "expo": $star, "love": $red) + +@each $name, $color in $navbar-items + .bd-navbar-item-#{$name} + .icon + color: $color + &:hover + background-color: $color !important + color: #fff !important + .icon + color: currentColor !important + +.bd-navbar-item-expo + &:hover + color: #744F09 !important + .icon + color: #FF7B00 !important + + .bd-special-shadow background-image: linear-gradient(rgba(#000, 0.1), rgba(#000, 0)) height: 8px @@ -28,13 +53,13 @@ width: 24px .button.bd-is-rss - background-color: #f26522 + background-color: $rss border-color: transparent color: #fff &:hover - background-color: darken(#f26522, 5%) + background-color: darken($rss, 5%) &:active - background-color: darken(#f26522, 10%) + background-color: darken($rss, 10%) .bd-view-all-versions color: $text-light diff --git a/docs/bulma-docs.sass b/docs/bulma-docs.sass index a4ee2fbd..c7e28d28 100644 --- a/docs/bulma-docs.sass +++ b/docs/bulma-docs.sass @@ -9,8 +9,11 @@ $fortyfour: #5f45bb $amazon: #ffd863 $bleeding-green: #ABF47C $bleeding-red: #CA1F26 +$star: #FFD257 +$rss: #f26522 @import "../bulma" +@import "./_sass/main" @import "./_sass/highlight" @import "./_sass/override" @import "./_sass/global" diff --git a/docs/css/bulma-docs.css b/docs/css/bulma-docs.css index 6b3f2098..003fd5c3 100644 --- a/docs/css/bulma-docs.css +++ b/docs/css/bulma-docs.css @@ -5084,7 +5084,7 @@ a.tag:hover { color: #3273dc; display: flex; justify-content: center; - padding: 0.5em 0.75em; + padding: 0 0.75em; } .breadcrumb a:hover { @@ -5848,6 +5848,7 @@ a.dropdown-item.is-active { box-shadow: 0 2px 0 0 whitesmoke; min-height: 3.25rem; position: relative; + z-index: 30; } .navbar.is-white { @@ -9491,6 +9492,88 @@ label.panel-block:hover { padding: 3rem 1.5rem 6rem; } +.bd-main { + overflow: hidden; + position: relative; +} + +.bd-lead { + position: relative; +} + +.bd-breadcrumb { + margin-bottom: 2.5rem; +} + +.bd-header { + margin-bottom: 2.5rem; +} + +.bd-header .subtitle { + color: #7a7a7a; +} + +.bd-header .subtitle strong { + color: currentColor; +} + +.bd-side, +.bd-side-background { + background-color: #fafafa; +} + +.bd-side { + position: relative; +} + +.bd-side-background { + bottom: 0; + left: 50%; + position: absolute; + right: 0; + top: 0; +} + +@media screen and (max-width: 1023px) { + .bd-lead, + .bd-side { + padding: 1.5rem; + } +} + +@media screen and (max-width: 768px) { + .bd-side-background { + display: none; + } +} + +@media screen and (min-width: 769px), print { + .bd-duo { + display: flex; + } + .bd-lead { + background-color: white; + overflow: hidden; + flex-grow: 1; + flex-shrink: 1; + } + .bd-side { + flex: 0 0 300px; + } +} + +@media screen and (min-width: 1024px) { + .bd-main { + padding: 0 3rem; + } + .bd-lead { + padding: 3rem 3rem 3rem 0; + } + .bd-side { + padding: 3rem 0 3rem 1.5rem; + } +} + .highlight { background-color: #f5f5f5; color: #586e75; @@ -9770,8 +9853,9 @@ svg { justify-content: center; margin-left: auto; margin-right: auto; - max-width: 340px; + max-width: 300px; min-height: 150px; + min-width: 280px; } #carbon { @@ -9787,7 +9871,7 @@ svg { @media screen and (min-width: 769px), print { #carbon { - width: 340px; + width: 300px; } } @@ -10282,6 +10366,100 @@ svg { text-decoration: underline; } +.bd-has-text-rss { + color: #f26522; +} + +.bd-has-text-star { + color: #FFD257; +} + +.bd-navbar-item-documentation .icon { + color: #00d1b2; +} + +.bd-navbar-item-documentation:hover { + background-color: #00d1b2 !important; + color: #fff !important; +} + +.bd-navbar-item-documentation:hover .icon { + color: currentColor !important; +} + +.bd-navbar-item-templates .icon { + color: #209cee; +} + +.bd-navbar-item-templates:hover { + background-color: #209cee !important; + color: #fff !important; +} + +.bd-navbar-item-templates:hover .icon { + color: currentColor !important; +} + +.bd-navbar-item-videos .icon { + color: #23d160; +} + +.bd-navbar-item-videos:hover { + background-color: #23d160 !important; + color: #fff !important; +} + +.bd-navbar-item-videos:hover .icon { + color: currentColor !important; +} + +.bd-navbar-item-blog .icon { + color: #f26522; +} + +.bd-navbar-item-blog:hover { + background-color: #f26522 !important; + color: #fff !important; +} + +.bd-navbar-item-blog:hover .icon { + color: currentColor !important; +} + +.bd-navbar-item-expo .icon { + color: #FFD257; +} + +.bd-navbar-item-expo:hover { + background-color: #FFD257 !important; + color: #fff !important; +} + +.bd-navbar-item-expo:hover .icon { + color: currentColor !important; +} + +.bd-navbar-item-love .icon { + color: #ff3860; +} + +.bd-navbar-item-love:hover { + background-color: #ff3860 !important; + color: #fff !important; +} + +.bd-navbar-item-love:hover .icon { + color: currentColor !important; +} + +.bd-navbar-item-expo:hover { + color: #744F09 !important; +} + +.bd-navbar-item-expo:hover .icon { + color: #FF7B00 !important; +} + .bd-special-shadow { background-image: linear-gradient(rgba(0, 0, 0, 0.1), transparent); height: 8px; diff --git a/docs/documentation/elements/button.html b/docs/documentation/elements/button.html index fa1c3d54..47989a99 100644 --- a/docs/documentation/elements/button.html +++ b/docs/documentation/elements/button.html @@ -1,8 +1,13 @@ --- title: Button +subtitle: "The classic button, in different colors, sizes, and states" layout: documentation doc-tab: elements doc-subtab: button +meta: +- colors: true +- sizes: true +- variables: true --- {% capture button_example %} @@ -448,342 +453,322 @@ doc-subtab: button {% endcapture %} -{% include subnav/subnav-elements.html %} + + + The button is an essential element of any design. It's meant to look and behave as an interactive element of your page. + + - - - Buttons - - The classic button, in different colors, sizes, and states - - {% - include meta.html - colors=true - sizes=true - variables=true - %} +{% include snippet.html content=button_example %} - + + + The .button class can be used on: + + + + <a> anchor links + + + <button> form buttons + + + <input type="submit"> submit inputs + + + <input type="reset"> reset inputs + + + +{% include snippet.html content=button_tags_example %} + +{% include anchor.html name="Colors" %} + +{% include snippet.html content=button_colors_a_example %} + +{% include snippet.html content=button_colors_b_example %} + +{% include anchor.html name="Sizes" %} + +{% include snippet.html content=button_sizes_example %} + +{% include anchor.html name="Styles" %} + +Outlined + +{% include snippet.html content=button_outlined_example %} + +Inverted (the text color becomes the background color, and vice-versa) + + + + + {{button_inverted_example}} + + + + {% highlight html %}{{button_inverted_example}}{% endhighlight %} + + + +Invert Outlined (the invert color becomes the text and border colors) + + + + + {{button_inverted_outlined_example}} + + + + {% highlight html %}{{button_inverted_outlined_example}}{% endhighlight %} + + + +Rounded buttons + + + + {% include elements/new-tag.html version="0.6.2" %} + {{ button_rounded_example }} + + + {% highlight html %}{{ button_rounded_example }}{% endhighlight %} + + + +{% include anchor.html name="States" %} + +Normal + +{% include snippet.html content=button_normal_example %} + +Hover + +{% include snippet.html content=button_hover_example %} + +Focus + +{% include snippet.html content=button_focus_example %} + +Active + +{% include snippet.html content=button_active_example %} + +Loading + + + + + {{button_loading_example}} + + + + + Since the loading spinner is implemented using the :after pseudo-element, it is not supported by the <input type="submit"> element. + + + + + + {% highlight html %}{{button_loading_example}}{% endhighlight %} + + + + + Static + + + + - The button is an essential element of any design. It's meant to look and behave as an interactive element of your page. + You can create a non-interactive button by using the is-static modifier. This is useful to align a text label with an input, for example when using form addons. + {{button_static_example}} + + + {% highlight html %}{{button_static_example}}{% endhighlight %} + + - {% include snippet.html content=button_example %} +Disabled + + + + {{button_disabled_example}} + + + + The is-disabled CSS class has been deprecated in favor of the disabled HTML attribute. Learn more + + + + + {% highlight html %}{{button_disabled_example}}{% endhighlight %} + + + +With Font Awesome icons + +{% include snippet.html content=button_fa_example clipped=true %} + + + - The .button class can be used on: + If the button only contains an icon, Bulma will make sure the button remains square, no matter the size of the button or of the icon. + + + {{button_only_icon_example}} + + + {% highlight html %}{{button_only_icon_example}}{% endhighlight %} + + + +{% include anchor.html name="Button group" %} + + + If you want to group buttons together on a single line, use the is-grouped modifier on the field container: + + +{% include snippet.html content=button_group_example %} + +{% include anchor.html name="Button addons" %} + + + If you want to use buttons as addons, use the has-addons modifier on the field container: + + +{% include snippet.html content=button_addons_example %} + +{% include anchor.html name="Button group with addons" %} + + + You can group together addons as well: + + +{% include snippet.html content=button_group_addons_example %} + +{% include anchor.html name="List of buttons" %} + +{% include elements/new-tag.html version="0.6.1" %} + + + + + + You can now create a list of buttons with the .buttons container. + + + + {{ buttons }} + + + + {% highlight html %}{{ buttons }}{% endhighlight %} + + + + + + + + If the list is very long, it will automatically wrap on multiple lines, while keeping all buttons evenly spaced. + + + + {{ buttons_multiple }} + + + + {% highlight html %}{{ buttons_multiple }}{% endhighlight %} + + + + + + + + You can attach buttons together with the .has-addons modifier. + + + + {{ buttons_addons }} + + + + {% highlight html %}{{ buttons_addons }}{% endhighlight %} + + + + + + + + Use the is-centered or the is-right modifiers to alter the alignment. + + + + {{ buttons_addons_centered }} + {{ buttons_addons_right }} + + + + {% highlight html %}{{ buttons_addons_centered }}{{ buttons_addons_right }}{% endhighlight %} + + + + + + + + You can use any modifier class on each button to differentiate them. Make sure to add the is-selected modifier as well to make sure the selected button is above its siblings. + + + + {{ buttons_addons_selected }} + + + + {% highlight html %}{{ buttons_addons_selected }}{% endhighlight %} + + + + + + Difference between form groups and list of buttons + + + + + While this list of buttons style can be achieved with either field is-grouped or the new buttons class, there are a few differences: - <a> anchor links + buttons has a simpler markup - <button> form buttons + buttons can only contain button elements - <input type="submit"> submit inputs + field is-grouped can contain any type of control inputs - <input type="reset"> reset inputs + field is-grouped can be forced to fit all controls on a single line + + + with field is-grouped you can expand one of the controls + + Basically, if you only want a list of buttons, using buttons is recommended. If you need more control on the styling and the elements, use a form group. + - - {% include snippet.html content=button_tags_example %} - - {% include anchor.html name="Colors" %} - - {% include snippet.html content=button_colors_a_example %} - - {% include snippet.html content=button_colors_b_example %} - - {% include anchor.html name="Sizes" %} - - {% include snippet.html content=button_sizes_example %} - - {% include anchor.html name="Styles" %} - - Outlined - - {% include snippet.html content=button_outlined_example %} - - Inverted (the text color becomes the background color, and vice-versa) - - - - - {{button_inverted_example}} - - - - {% highlight html %}{{button_inverted_example}}{% endhighlight %} - - - - Invert Outlined (the invert color becomes the text and border colors) - - - - - {{button_inverted_outlined_example}} - - - - {% highlight html %}{{button_inverted_outlined_example}}{% endhighlight %} - - - - Rounded buttons - - - - {% include elements/new-tag.html version="0.6.2" %} - {{ button_rounded_example }} - - - {% highlight html %}{{ button_rounded_example }}{% endhighlight %} - - - - {% include anchor.html name="States" %} - - Normal - - {% include snippet.html content=button_normal_example %} - - Hover - - {% include snippet.html content=button_hover_example %} - - Focus - - {% include snippet.html content=button_focus_example %} - - Active - - {% include snippet.html content=button_active_example %} - - Loading - - - - - {{button_loading_example}} - - - - - Since the loading spinner is implemented using the :after pseudo-element, it is not supported by the <input type="submit"> element. - - - - - - {% highlight html %}{{button_loading_example}}{% endhighlight %} - - - - - Static - - - - - - - You can create a non-interactive button by using the is-static modifier. This is useful to align a text label with an input, for example when using form addons. - - - {{button_static_example}} - - - {% highlight html %}{{button_static_example}}{% endhighlight %} - - - - Disabled - - - - - {{button_disabled_example}} - - - - The is-disabled CSS class has been deprecated in favor of the disabled HTML attribute. Learn more - - - - - {% highlight html %}{{button_disabled_example}}{% endhighlight %} - - - - With Font Awesome icons - - {% include snippet.html content=button_fa_example clipped=true %} - - - - - - If the button only contains an icon, Bulma will make sure the button remains square, no matter the size of the button or of the icon. - - - {{button_only_icon_example}} - - - {% highlight html %}{{button_only_icon_example}}{% endhighlight %} - - - - {% include anchor.html name="Button group" %} - - - If you want to group buttons together on a single line, use the is-grouped modifier on the field container: - - - {% include snippet.html content=button_group_example %} - - {% include anchor.html name="Button addons" %} - - - If you want to use buttons as addons, use the has-addons modifier on the field container: - - - {% include snippet.html content=button_addons_example %} - - {% include anchor.html name="Button group with addons" %} - - - You can group together addons as well: - - - {% include snippet.html content=button_group_addons_example %} - - {% include anchor.html name="List of buttons" %} - - {% include elements/new-tag.html version="0.6.1" %} - - - - - - You can now create a list of buttons with the .buttons container. - - - - {{ buttons }} - - - - {% highlight html %}{{ buttons }}{% endhighlight %} - - - - - - - - If the list is very long, it will automatically wrap on multiple lines, while keeping all buttons evenly spaced. - - - - {{ buttons_multiple }} - - - - {% highlight html %}{{ buttons_multiple }}{% endhighlight %} - - - - - - - - You can attach buttons together with the .has-addons modifier. - - - - {{ buttons_addons }} - - - - {% highlight html %}{{ buttons_addons }}{% endhighlight %} - - - - - - - - Use the is-centered or the is-right modifiers to alter the alignment. - - - - {{ buttons_addons_centered }} - {{ buttons_addons_right }} - - - - {% highlight html %}{{ buttons_addons_centered }}{{ buttons_addons_right }}{% endhighlight %} - - - - - - - - You can use any modifier class on each button to differentiate them. Make sure to add the is-selected modifier as well to make sure the selected button is above its siblings. - - - - {{ buttons_addons_selected }} - - - - {% highlight html %}{{ buttons_addons_selected }}{% endhighlight %} - - - - - - Difference between form groups and list of buttons - - - - - While this list of buttons style can be achieved with either field is-grouped or the new buttons class, there are a few differences: - - - - buttons has a simpler markup - - - buttons can only contain button elements - - - field is-grouped can contain any type of control inputs - - - field is-grouped can be forced to fit all controls on a single line - - - with field is-grouped you can expand one of the controls - - - - Basically, if you only want a list of buttons, using buttons is recommended. If you need more control on the styling and the elements, use a form group. - - - - - - {% include variables.html type='element' %} - - + + +{% include variables.html type='element' %} diff --git a/docs/index.html b/docs/index.html index 3f9765a5..57ce2caa 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ route: index fixed_navbar: true --- -{% include navbar.html id="Index" fixed=true has_container=true boxed=true transparent=true hide_fortyfour=true %} +{% include navbar.html id="Index" %} {% include index/intro.html %} diff --git a/docs/lib/main.js b/docs/lib/main.js index e4ae35b2..4063ee49 100644 --- a/docs/lib/main.js +++ b/docs/lib/main.js @@ -287,22 +287,22 @@ document.addEventListener('DOMContentLoaded', function () { } } - translateHeader(window.scrollY, false); + // translateHeader(window.scrollY, false); var ticking = false; var lastY = 0; - window.addEventListener('scroll', function () { - var currentY = window.scrollY; + // window.addEventListener('scroll', function() { + // const currentY = window.scrollY; - if (!ticking) { - window.requestAnimationFrame(function () { - upOrDown(lastY, currentY); - ticking = false; - lastY = currentY; - }); - } + // if (!ticking) { + // window.requestAnimationFrame(function() { + // upOrDown(lastY, currentY); + // ticking = false; + // lastY = currentY; + // }); + // } - ticking = true; - }); + // ticking = true; + // }); }); \ No newline at end of file diff --git a/sass/components/breadcrumb.sass b/sass/components/breadcrumb.sass index 5cf37297..57bb2de2 100644 --- a/sass/components/breadcrumb.sass +++ b/sass/components/breadcrumb.sass @@ -2,6 +2,9 @@ $breadcrumb-item-color: $link !default $breadcrumb-item-hover-color: $link-hover !default $breadcrumb-item-active-color: $text-strong !default +$breadcrumb-item-padding-vertical: 0 !default +$breadcrumb-item-padding-horizontal: 0.75em !default + $breadcrumb-item-separator-color: $text !default .breadcrumb @@ -18,7 +21,7 @@ $breadcrumb-item-separator-color: $text !default color: $breadcrumb-item-color display: flex justify-content: center - padding: 0.5em 0.75em + padding: $breadcrumb-item-padding-vertical $breadcrumb-item-padding-horizontal &:hover color: $breadcrumb-item-hover-color li diff --git a/sass/components/navbar.sass b/sass/components/navbar.sass index 3e539fa2..eaeaba37 100644 --- a/sass/components/navbar.sass +++ b/sass/components/navbar.sass @@ -1,5 +1,6 @@ $navbar-background-color: $white !default $navbar-height: 3.25rem !default +$navbar-z: 30 !default $navbar-fixed-z: 30 !default $navbar-item-color: $grey-dark !default @@ -45,6 +46,7 @@ $navbar-divider-background-color: $border !default box-shadow: 0 2px 0 0 $background min-height: $navbar-height position: relative + z-index: $navbar-z @each $name, $pair in $colors $color: nth($pair, 1) $color-invert: nth($pair, 2)
+ + + + + This page is open source. + Noticed a typo? Or something unclear? + + + Improve this page on GitHub + +
- Documentation -
- Everything you need to create a website with Bulma + {{ page.subtitle }}
- - - - - This page is open source. - Noticed a typo? Or something unclear? - - - Improve this page on GitHub - -
+ The button is an essential element of any design. It's meant to look and behave as an interactive element of your page. +
+ The .button class can be used on: +
.button
<a>
<button>
<input type="submit">
<input type="reset">
+ Since the loading spinner is implemented using the :after pseudo-element, it is not supported by the <input type="submit"> element. +
:after
- The button is an essential element of any design. It's meant to look and behave as an interactive element of your page. + You can create a non-interactive button by using the is-static modifier. This is useful to align a text label with an input, for example when using form addons.
is-static
The is-disabled CSS class has been deprecated in favor of the disabled HTML attribute. Learn more
is-disabled
disabled
- The .button class can be used on: + If the button only contains an icon, Bulma will make sure the button remains square, no matter the size of the button or of the icon. +
If you want to group buttons together on a single line, use the is-grouped modifier on the field container:
is-grouped
field
If you want to use buttons as addons, use the has-addons modifier on the field container:
has-addons
You can group together addons as well:
+ You can now create a list of buttons with the .buttons container. +
.buttons
+ If the list is very long, it will automatically wrap on multiple lines, while keeping all buttons evenly spaced. +
+ You can attach buttons together with the .has-addons modifier. +
.has-addons
+ Use the is-centered or the is-right modifiers to alter the alignment. +
is-centered
is-right
+ You can use any modifier class on each button to differentiate them. Make sure to add the is-selected modifier as well to make sure the selected button is above its siblings. +
is-selected
Difference between form groups and list of buttons
+ While this list of buttons style can be achieved with either field is-grouped or the new buttons class, there are a few differences:
field is-grouped
buttons
button
control
+ Basically, if you only want a list of buttons, using buttons is recommended. If you need more control on the styling and the elements, use a form group. +
- Since the loading spinner is implemented using the :after pseudo-element, it is not supported by the <input type="submit"> element. -
- You can create a non-interactive button by using the is-static modifier. This is useful to align a text label with an input, for example when using form addons. -
- If the button only contains an icon, Bulma will make sure the button remains square, no matter the size of the button or of the icon. -
- You can now create a list of buttons with the .buttons container. -
- If the list is very long, it will automatically wrap on multiple lines, while keeping all buttons evenly spaced. -
- You can attach buttons together with the .has-addons modifier. -
- Use the is-centered or the is-right modifiers to alter the alignment. -
- You can use any modifier class on each button to differentiate them. Make sure to add the is-selected modifier as well to make sure the selected button is above its siblings. -
- While this list of buttons style can be achieved with either field is-grouped or the new buttons class, there are a few differences: -
- Basically, if you only want a list of buttons, using buttons is recommended. If you need more control on the styling and the elements, use a form group. -