From: Jeremy Thomas Date: Sun, 30 Oct 2016 14:59:46 +0000 (+0000) Subject: Fix inputs with icons X-Git-Tag: 0.3.0^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84a40052fc732dfe1accc335818e62f03ab9a07d;p=thirdparty%2Fbulma.git Fix inputs with icons --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c6ae45c2..ebb3b05f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,15 @@ ## 0.3.0 -# Use `rem` and `em` -# Move variables to their own file -# Remove small tag -# Add :focus state -# Fix Font Awesome icons in buttons -# Fix table -# Remove table .is-icon and .is-link +* Use `rem` and `em` +* Move variables to their own file +* Remove small tag +* Add `:focus` state +* Fix Font Awesome icons in buttons +* Fix table +* Remove table `.is-icon` and `.is-link` +* Add `.content` table +* Fix inputs with icons ## 0.2.2 diff --git a/docs/css/bulma-docs.css b/docs/css/bulma-docs.css index 42af8a3d1..63ba28d8d 100644 --- a/docs/css/bulma-docs.css +++ b/docs/css/bulma-docs.css @@ -1309,10 +1309,11 @@ a.box:active { margin-top: 0.25em; } -.content blockquote:not(:last-child), .content p:not(:last-child), .content ol:not(:last-child), -.content ul:not(:last-child) { +.content ul:not(:last-child), +.content blockquote:not(:last-child), +.content table:not(:last-child) { margin-bottom: 1em; } @@ -1398,6 +1399,44 @@ a.box:active { list-style-type: square; } +.content table { + width: 100%; +} + +.content table td, +.content table th { + border: 1px solid #dbdbdb; + border-width: 0 0 1px; + padding: 0.5em 0.75em; + vertical-align: top; +} + +.content table th { + color: #363636; + text-align: left; +} + +.content table tr:hover { + background-color: whitesmoke; +} + +.content table thead td, +.content table thead th { + border-width: 0 0 2px; + color: #363636; +} + +.content table tfoot td, +.content table tfoot th { + border-width: 2px 0 0; + color: #363636; +} + +.content table tbody tr:last-child td, +.content table tbody tr:last-child th { + border-bottom-width: 0; +} + .content.is-small { font-size: 0.75rem; } @@ -1903,102 +1942,70 @@ a.box:active { flex-shrink: 0; } -.control.has-icon > .fa { - display: inline-block; - font-size: 14px; - height: 24px; - line-height: 24px; - text-align: center; - vertical-align: top; - width: 24px; +.control.has-icon .icon { color: #dbdbdb; pointer-events: none; position: absolute; - top: 4px; + top: 1.25rem; z-index: 4; } -.control.has-icon .input:focus + .fa { - color: #b5b5b5; +.control.has-icon .input:focus + .icon { + color: #7a7a7a; } -.control.has-icon .input.is-small + .fa { - font-size: 10.5px; - top: 0; +.control.has-icon .input.is-small + .icon { + top: 0.9375rem; } -.control.has-icon .input.is-medium + .fa { - font-size: 21px; - top: 8px; +.control.has-icon .input.is-medium + .icon { + top: 1.5625rem; } -.control.has-icon .input.is-large + .fa { - font-size: 21px; - top: 12px; +.control.has-icon .input.is-large + .icon { + top: 1.875rem; } -.control.has-icon:not(.has-icon-right) > .fa { - left: 4px; +.control.has-icon:not(.has-icon-right) .icon { + left: 1.25rem; + transform: translateX(-50%) translateY(-50%); } .control.has-icon:not(.has-icon-right) .input { - padding-left: 32px; -} - -.control.has-icon:not(.has-icon-right) .input.is-small { - padding-left: 24px; -} - -.control.has-icon:not(.has-icon-right) .input.is-small + .fa { - left: 0; -} - -.control.has-icon:not(.has-icon-right) .input.is-medium { - padding-left: 40px; + padding-left: 2.5em; } -.control.has-icon:not(.has-icon-right) .input.is-medium + .fa { - left: 8px; +.control.has-icon:not(.has-icon-right) .input.is-small + .icon { + left: 0.9375rem; } -.control.has-icon:not(.has-icon-right) .input.is-large { - padding-left: 48px; +.control.has-icon:not(.has-icon-right) .input.is-medium + .icon { + left: 1.5625rem; } -.control.has-icon:not(.has-icon-right) .input.is-large + .fa { - left: 12px; +.control.has-icon:not(.has-icon-right) .input.is-large + .icon { + left: 1.875rem; } -.control.has-icon.has-icon-right > .fa { - right: 4px; +.control.has-icon.has-icon-right .icon { + right: 1.25rem; + transform: translateX(50%) translateY(-50%); } .control.has-icon.has-icon-right .input { - padding-right: 32px; -} - -.control.has-icon.has-icon-right .input.is-small { - padding-right: 24px; -} - -.control.has-icon.has-icon-right .input.is-small + .fa { - right: 0; -} - -.control.has-icon.has-icon-right .input.is-medium { - padding-right: 40px; + padding-right: 2.5em; } -.control.has-icon.has-icon-right .input.is-medium + .fa { - right: 8px; +.control.has-icon.has-icon-right .input.is-small + .icon { + right: 0.9375rem; } -.control.has-icon.has-icon-right .input.is-large { - padding-right: 48px; +.control.has-icon.has-icon-right .input.is-medium + .icon { + right: 1.5625rem; } -.control.has-icon.has-icon-right .input.is-large + .fa { - right: 12px; +.control.has-icon.has-icon-right .input.is-large + .icon { + right: 1.875rem; } .control.is-grouped { @@ -2053,7 +2060,7 @@ a.box:active { } .icon { - background: pink; + background: whitesmoke; display: inline-block; font-size: 21px; height: 1.5rem; @@ -2397,17 +2404,17 @@ a.box:active { color: #7a7a7a; } -.table tbody tr:last-child td, -.table tbody tr:last-child th { - border-bottom-width: 0; -} - .table tfoot td, .table tfoot th { border-width: 2px 0 0; color: #7a7a7a; } +.table tbody tr:last-child td, +.table tbody tr:last-child th { + border-bottom-width: 0; +} + .table.is-bordered td, .table.is-bordered th { border-width: 1px; @@ -5947,524 +5954,3 @@ a.panel-block:hover { .footer a:not(.icon):hover, .footer a:visited:not(.icon):hover { border-bottom-color: #00d1b2; } - -@media screen and (min-width: 769px) { - .button small { - color: #4a4a4a; - left: 0; - margin-top: 10px; - position: absolute; - top: 100%; - width: 100%; - } -} - -body.page-grid .column > .notification { - padding-left: 0; - padding-right: 0; - text-align: center; -} - -@media screen and (min-width: 769px) { - .header-item .button + .button { - margin-left: 0.75rem; - } -} - -svg { - max-height: 100%; - max-width: 100%; -} - -#carbon { - max-width: 340px; - min-height: 130px; - padding: 15px; -} - -@media screen and (min-width: 769px) { - #carbon { - margin-left: auto; - margin-right: auto; - width: 340px; - } -} - -#carbonads { - text-align: left; -} - -#carbonads a:hover { - text-decoration: underline; -} - -#carbonads span { - display: block; -} - -#carbonads .carbon-img { - float: left; - height: 100px; - width: 130px; -} - -#carbonads .carbon-img img { - display: block; -} - -#carbonads .carbon-text { - display: block; - color: #363636; - margin-left: 145px; -} - -#carbonads .carbon-poweredby { - font-size: 0.75rem; - margin-left: 15px; -} - -#github { - color: #333333; - border-color: #333333; -} - -#github:hover { - background: #333333; - border-color: #333333; - color: white; -} - -#twitter { - color: #55acee; - border-color: #55acee; -} - -#twitter:hover { - background: #55acee; - border-color: #55acee; - color: white; -} - -@keyframes floatUp { - 0% { - box-shadow: 0 0 0 rgba(10, 10, 10, 0), 0 0 0 rgba(10, 10, 10, 0), 0 0 0 rgba(10, 10, 10, 0); - transform: scale(0.86); - } - 67% { - box-shadow: 0 0 0 rgba(10, 10, 10, 0), 0 5px 10px rgba(10, 10, 10, 0.1), 0 1px 1px rgba(10, 10, 10, 0.2); - transform: scale(1); - } - 100% { - box-shadow: 0 20px 60px rgba(10, 10, 10, 0.05), 0 5px 10px rgba(10, 10, 10, 0.1), 0 1px 1px rgba(10, 10, 10, 0.2); - transform: scale(1); - } -} - -@keyframes strokePath { - from { - stroke-dashoffset: 880; - } - to { - stroke-dashoffset: 0; - } -} - -@keyframes fadeIn { - from { - opacity: 0; - transform: scale(0.86); - } - to { - opacity: 1; - transform: scale(1); - } -} - -@keyframes fadeOut { - 0% { - opacity: 1; - transform: scale(0.86); - } - 67% { - opacity: 1; - transform: scale(0.86); - } - 100% { - opacity: 0; - transform: scale(1); - } -} - -@keyframes slideDown { - 0% { - opacity: 0; - transform: translateY(-10px); - } - 100% { - opacity: 1; - transform: translateY(0); - } -} - -@keyframes slideUp { - 0% { - opacity: 0; - transform: translateY(10px); - } - 100% { - opacity: 1; - transform: translateY(0); - } -} - -#b { - animation-delay: 1s; - animation-duration: 1.5s; - animation-fill-mode: both; - animation-name: floatUp; - animation-timing-function: cubic-bezier(0, 0.71, 0.29, 1); - border-radius: 24px; - display: inline-block; - height: 240px; - margin-bottom: 40px; - position: relative; - vertical-align: top; - width: 240px; -} - -#b svg { - bottom: 0; - left: 0; - position: absolute; - right: 0; - top: 0; - display: block; - height: 240px; - width: 240px; -} - -#b svg:first-child { - animation-duration: 1.5s; - animation-fill-mode: both; - animation-name: fadeOut; - animation-timing-function: cubic-bezier(0, 0.71, 0.29, 1); -} - -#b svg:first-child g { - animation-duration: 1s; - animation-fill-mode: both; - animation-name: strokePath; - animation-timing-function: cubic-bezier(0, 0.71, 0.29, 1); - fill: none; - stroke: #00d1b2; - stroke-dasharray: 880; - stroke-width: 2px; -} - -#b svg:last-child { - animation-delay: 1s; - animation-duration: 1s; - animation-fill-mode: both; - animation-name: fadeIn; - animation-timing-function: cubic-bezier(0, 0.71, 0.29, 1); -} - -#b svg:last-child g { - fill: #00d1b2; -} - -@media screen and (max-width: 768px) { - #b { - border-radius: 16px; - height: 160px; - width: 160px; - } -} - -#bulma { - animation: slideDown 500ms both; - animation-delay: 1s; -} - -#modern-framework { - animation: slideUp 500ms both; - animation-delay: 1.2s; -} - -#npm { - animation: fadeIn 500ms both; - animation-delay: 1.4s; - background: none; - margin: -10px 0 20px; -} - -#npm code { - border-radius: 3px; - color: #00d1b2; - display: inline-block; - font-size: 16px; - padding: 16px 32px; -} - -#ghbtns { - animation: slideDown 500ms both; - animation-delay: 1.6s; -} - -html.route-index #carbon { - animation: slideUp 500ms both; - animation-delay: 1.8s; -} - -#download { - animation: fadeIn 500ms both; - animation-delay: 2s; -} - -#grid .notification { - padding-left: 0; - padding-right: 0; -} - -#message { - display: none; -} - -#tweet { - background: white; - border-radius: 5px; - box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1); - padding: 1.5rem; -} - -#mc_embed_signup .control { - margin-bottom: 0; -} - -#mc_embed_signup .notification { - margin-top: 0.75rem; -} - -#social { - align-items: center; - display: flex; - flex-wrap: wrap; - margin-bottom: 1em; - justify-content: center; -} - -#social a { - display: inline-block; - font-size: 11px; - height: 20px; - line-height: 20px; - margin: 5px; -} - -#social iframe { - margin: 5px; -} - -#images tr td:nth-child(2) { - width: 320px; -} - -.color { - display: inline-block; - float: left; - height: 18px; - margin-right: 5px; - width: 18px; -} - -.example, -.structure { - border: 1px solid #ffdd57; - border-top-right-radius: 3px; - color: rgba(0, 0, 0, 0.7); - padding: 1.25rem 1.5rem; - position: relative; -} - -.example:not(:first-child), -.structure:not(:first-child) { - margin-top: 2rem; -} - -.example:not(:last-child), -.structure:not(:last-child) { - margin-bottom: 1.5rem; -} - -.example:before, -.structure:before { - background: #ffdd57; - border-radius: 3px 3px 0 0; - bottom: 100%; - content: "Example"; - display: inline-block; - font-size: 7px; - font-weight: bold; - left: -1px; - letter-spacing: 1px; - padding: 3px 5px; - position: absolute; - text-transform: uppercase; - vertical-align: top; -} - -@media screen and (min-width: 769px) { - .example.is-fullwidth, - .structure.is-fullwidth { - border-left: none; - border-right: none; - padding: 0; - } -} - -.example + .highlight { - border: 1px solid #ffdd57; - border-radius: 0 0 3px 3px; - border-top: none; - margin-top: -1.5rem; -} - -.example + .highlight pre { - max-height: 600px; -} - -.example + .highlight:not(:last-child) { - margin-bottom: 3rem; -} - -.structure { - border-color: #ff3860; - border-radius: 3px; - padding: 1.5rem; -} - -.structure:before { - background: #ff3860; - color: #fff; - content: "Structure"; -} - -.structure-item { - position: relative; -} - -.structure-item:before { - bottom: 0; - left: 0; - position: absolute; - right: 0; - top: 0; - background: rgba(10, 10, 10, 0.7); - background: whitesmoke; - border: 1px solid #dbdbdb; - content: ""; - display: block; - z-index: 1; -} - -.structure-item:after { - bottom: 0; - left: 0; - position: absolute; - right: 0; - top: 0; - align-items: center; - content: attr(title); - display: flex; - font-family: "Inconsolata", "Consolas", "Monaco", monospace; - font-size: 11px; - justify-content: center; - padding: 3px 5px; - z-index: 2; -} - -.structure-item.is-structure-container { - padding: 1.5rem 0.75rem 0.75rem; -} - -.structure-item.is-structure-container:after { - align-items: flex-start; - justify-content: flex-start; - padding: 0.5rem 0.75rem; -} - -.highlight { - position: relative; -} - -.highlight .copy, -.highlight .expand { - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background: white; - border: solid #dbdbdb; - border-width: 0 0 1px 1px; - color: #7a7a7a; - cursor: pointer; - outline: none; - position: absolute; - right: 0; - top: 0; -} - -.highlight .copy:hover, -.highlight .expand:hover { - border-color: #ff3860; - color: #ff3860; -} - -.highlight .expand { - border-right-width: 1px; - right: 50px; -} - -@media screen and (min-width: 769px) { - .section:not(.is-fullwidth) > .example:not(.is-fullwidth) { - margin-left: 1.5rem; - margin-right: 1.5rem; - } - .section:not(.is-fullwidth) > .example:not(.is-fullwidth) + .highlight { - margin-left: 1.5rem; - margin-right: 1.5rem; - } -} - -.section.is-fullwidth { - padding: 0 !important; -} - -.section.is-fullwidth .example { - border-left: none; - border-radius: 0; - border-right: none; - padding: 0; -} - -.section.is-fullwidth .example + .highlight { - border-left: none; - border-radius: 0; - border-right: none; -} - -#newsletter .input { - border-color: white; - box-shadow: none; -} - -html ::-moz-selection { - background: #00d1b2; - color: #fff; -} - -html ::selection { - background: #00d1b2; - color: #fff; -} diff --git a/docs/documentation/elements/content.html b/docs/documentation/elements/content.html index 73be639e1..9acc98551 100644 --- a/docs/documentation/elements/content.html +++ b/docs/documentation/elements/content.html @@ -28,46 +28,7 @@ doc-subtab: content

This content class can be used in any context where you just want to (or can only) write some text. For example, it's used for the paragraph you're currently reading.

-
-
-

Hello World

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel erat vel, interdum mattis neque.

-

Second level

-

Curabitur accumsan turpis pharetra augue tincidunt blandit. Quisque condimentum maximus mi, sit amet commodo arcu rutrum id. Proin pretium urna vel cursus venenatis. Suspendisse potenti. Etiam mattis sem rhoncus lacus dapibus facilisis. Donec at dignissim dui. Ut et neque nisl.

-
    -
  • In fermentum leo eu lectus mollis, quis dictum mi aliquet.
  • -
  • Morbi eu nulla lobortis, lobortis est in, fringilla felis.
  • -
  • Aliquam nec felis in sapien venenatis viverra fermentum nec lectus.
  • -
  • Ut non enim metus.
  • -
-

Third level

-

Quisque ante lacus, malesuada ac auctor vitae, congue non ante. Phasellus lacus ex, semper ac tortor nec, fringilla condimentum orci. Fusce eu rutrum tellus.

-
    -
  1. Donec blandit a lorem id convallis.
  2. -
  3. Cras gravida arcu at diam gravida gravida.
  4. -
  5. Integer in volutpat libero.
  6. -
  7. Donec a diam tellus.
  8. -
  9. Aenean nec tortor orci.
  10. -
  11. Quisque aliquam cursus urna, non bibendum massa viverra eget.
  12. -
  13. Vivamus maximus ultricies pulvinar.
  14. -
-
Ut venenatis, nisl scelerisque sollicitudin fermentum, quam libero hendrerit ipsum, ut blandit est tellus sit amet turpis.
-

Quisque at semper enim, eu hendrerit odio. Etiam auctor nisl et justo sodales elementum. Maecenas ultrices lacus quis neque consectetur, et lobortis nisi molestie.

-

Sed sagittis enim ac tortor maximus rutrum. Nulla facilisi. Donec mattis vulputate risus in luctus. Maecenas vestibulum interdum commodo.

-

Suspendisse egestas sapien non felis placerat elementum. Morbi tortor nisl, suscipit sed mi sit amet, mollis malesuada nulla. Nulla facilisi. Nullam ac erat ante.

-

Fourth level

-

Nulla efficitur eleifend nisi, sit amet bibendum sapien fringilla ac. Mauris euismod metus a tellus laoreet, at elementum ex efficitur.

-

Maecenas eleifend sollicitudin dui, faucibus sollicitudin augue cursus non. Ut finibus eleifend arcu ut vehicula. Mauris eu est maximus est porta condimentum in eu justo. Nulla id iaculis sapien.

-

Phasellus porttitor enim id metus volutpat ultricies. Ut nisi nunc, blandit sed dapibus at, vestibulum in felis. Etiam iaculis lorem ac nibh bibendum rhoncus. Nam interdum efficitur ligula sit amet ullamcorper. Etiam tristique, leo vitae porta faucibus, mi lacus laoreet metus, at cursus leo est vel tellus. Sed ac posuere est. Nunc ultricies nunc neque, vitae ultricies ex sodales quis. Aliquam eu nibh in libero accumsan pulvinar. Nullam nec nisl placerat, pretium metus vel, euismod ipsum. Proin tempor cursus nisl vel condimentum. Nam pharetra varius metus non pellentesque.

-
Fifth level
-

Aliquam sagittis rhoncus vulputate. Cras non luctus sem, sed tincidunt ligula. Vestibulum at nunc elit. Praesent aliquet ligula mi, in luctus elit volutpat porta. Phasellus molestie diam vel nisi sodales, a eleifend augue laoreet. Sed nec eleifend justo. Nam et sollicitudin odio.

-
Sixth level
-

Cras in nibh lacinia, venenatis nisi et, auctor urna. Donec pulvinar lacus sed diam dignissim, ut eleifend eros accumsan. Phasellus non tortor eros. Ut sed rutrum lacus. Etiam purus nunc, scelerisque quis enim vitae, malesuada ultrices turpis. Nunc vitae maximus purus, nec consectetur dui. Suspendisse euismod, elit vel rutrum commodo, ipsum tortor maximus dui, sed varius sapien odio vitae est. Etiam at cursus metus.

- -
-
- -{% highlight html %} +{% capture content_example %}

Hello World

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel erat vel, interdum mattis neque.

@@ -97,6 +58,36 @@ doc-subtab: content

Fourth level

Nulla efficitur eleifend nisi, sit amet bibendum sapien fringilla ac. Mauris euismod metus a tellus laoreet, at elementum ex efficitur.

Maecenas eleifend sollicitudin dui, faucibus sollicitudin augue cursus non. Ut finibus eleifend arcu ut vehicula. Mauris eu est maximus est porta condimentum in eu justo. Nulla id iaculis sapien.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OneTwo
ThreeFour
FiveSix
SevenEight
NineTen
ElevenTwelve

Phasellus porttitor enim id metus volutpat ultricies. Ut nisi nunc, blandit sed dapibus at, vestibulum in felis. Etiam iaculis lorem ac nibh bibendum rhoncus. Nam interdum efficitur ligula sit amet ullamcorper. Etiam tristique, leo vitae porta faucibus, mi lacus laoreet metus, at cursus leo est vel tellus. Sed ac posuere est. Nunc ultricies nunc neque, vitae ultricies ex sodales quis. Aliquam eu nibh in libero accumsan pulvinar. Nullam nec nisl placerat, pretium metus vel, euismod ipsum. Proin tempor cursus nisl vel condimentum. Nam pharetra varius metus non pellentesque.

Fifth level

Aliquam sagittis rhoncus vulputate. Cras non luctus sem, sed tincidunt ligula. Vestibulum at nunc elit. Praesent aliquet ligula mi, in luctus elit volutpat porta. Phasellus molestie diam vel nisi sodales, a eleifend augue laoreet. Sed nec eleifend justo. Nam et sollicitudin odio.

@@ -104,13 +95,35 @@ doc-subtab: content

Cras in nibh lacinia, venenatis nisi et, auctor urna. Donec pulvinar lacus sed diam dignissim, ut eleifend eros accumsan. Phasellus non tortor eros. Ut sed rutrum lacus. Etiam purus nunc, scelerisque quis enim vitae, malesuada ultrices turpis. Nunc vitae maximus purus, nec consectetur dui. Suspendisse euismod, elit vel rutrum commodo, ipsum tortor maximus dui, sed varius sapien odio vitae est. Etiam at cursus metus.

+{% endcapture %} + +
+ {{content_example}} +
+ +{% highlight html %} +{{content_example}} {% endhighlight %}

Sizes

-

You can use the is-medium and is-large modifiers to change the font size.

+

You can use the is-small, is-medium and is-large modifiers to change the font size.

+
+
+
+

Hello World

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel erat vel, interdum mattis neque.

+

Second level

+

Curabitur accumsan turpis pharetra augue tincidunt blandit. Quisque condimentum maximus mi, sit amet commodo arcu rutrum id. Proin pretium urna vel cursus venenatis. Suspendisse potenti. Etiam mattis sem rhoncus lacus dapibus facilisis. Donec at dignissim dui. Ut et neque nisl.

+
    +
  • In fermentum leo eu lectus mollis, quis dictum mi aliquet.
  • +
  • Morbi eu nulla lobortis, lobortis est in, fringilla felis.
  • +
  • Aliquam nec felis in sapien venenatis viverra fermentum nec lectus.
  • +
  • Ut non enim metus.
  • +
+
diff --git a/docs/documentation/elements/form.html b/docs/documentation/elements/form.html index efed508d0..84bf2192d 100644 --- a/docs/documentation/elements/form.html +++ b/docs/documentation/elements/form.html @@ -30,64 +30,7 @@ doc-subtab: form

When combining several controls in a form, use the .control class as a container, to keep the spacing consistent.

-
-
- -

- -

- -

- - - This username is available -

- -

- - - This email is invalid -

- -

- - - -

- -

- -

-

- -

-

- - -

-
-

- -

-

- -

-
-
-
-{% highlight html %} +{% capture form_example %}

@@ -95,13 +38,17 @@ doc-subtab: form

- + + + This username is available

- + + + This email is invalid

@@ -141,6 +88,15 @@ doc-subtab: form

+{% endcapture %} + +
+
+ {{form_example}} +
+
+{% highlight html %} +{{form_example}} {% endhighlight %}
@@ -148,26 +104,7 @@ doc-subtab: form

Colors

-
-
-

- -

-

- -

-

- -

-

- -

-

- -

-
-
-{% highlight html %} +{% capture colors_example %}

@@ -183,62 +120,21 @@ doc-subtab: form

+{% endcapture %} +
+
+ {{colors_example}} +
+
+{% highlight html %} +{{colors_example}} {% endhighlight %}

-

Sizes

-
-
-

- -

-

- -

-

- -

-

- -

-

- - - -

-

- - - -

-

- - - -

-

- - - -

-
-
-{% highlight html %} +{% capture sizes_example %}

@@ -251,6 +147,47 @@ doc-subtab: form

+

+ + + +

+

+ + + +

+

+ + + +

+

+ + + +

+{% endcapture %} +

Sizes

+
+
+ {{sizes_example}} +
+
+{% highlight html %} +{{sizes_example}} {% endhighlight %}
@@ -259,129 +196,87 @@ doc-subtab: form

States

Normal

-
-
-

- -

-

- -

-
-
-{% highlight html %} +{% capture normal_example %}

-{% endhighlight %} -
-
- -

Hover

+{% endcapture %}
-

- -

-

- -

+{{normal_example}}
{% highlight html %} +{{normal_example}} +{% endhighlight %} +
+
+ +

Hover

+{% capture hover_example %}

-{% endhighlight %} -
-
- -

Focus

+{% endcapture %}
-

- -

-

- -

+ {{hover_example}}
{% highlight html %} +{{hover_example}} +{% endhighlight %} +
+
+ +

Focus

+{% capture focus_example %}

-{% endhighlight %} -
-
- -

Loading

+{% endcapture %}
-

- -

-

- -

+{{focus_example}}
{% highlight html %} +{{focus_example}} +{% endhighlight %} +
+
+ +

Loading

+{% capture loading_example %}

-{% endhighlight %} -
-
- -

Disabled

+{% endcapture %}
-

- -

-

- -

-

- -

-

- - -

-
-

- -

-

- -

-
+{{loading_example}}
{% highlight html %} +{{loading_example}} +{% endhighlight %} +
+
+ +

Disabled

+{% capture disabled_example %}

@@ -412,118 +307,171 @@ doc-subtab: form

-{% endhighlight %} - - - -

With Font Awesome icons

+{% endcapture %}
-

- - -

-

- - -

-

- -

+{{disabled_example}}
{% highlight html %} +{{disabled_example}} +{% endhighlight %} +
+
+ +

With Font Awesome icons

+{% capture icons_example %}

- + + +

- + + +

-{% endhighlight %} - - +{% endcapture %}
-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

+{{icons_example}}
{% highlight html %} +{{icons_example}} +{% endhighlight %} +
+
+ +{% capture icons_sizes_example %}

- + + + +

+

+ + + +

- + + + +

+

+ + + +

- + + + +

+

+ + + + +

+

+ + + + +

+

+ + + + +

+

+ + + +

- + + +

+{% endcapture %} +
+
+
+

+ New! +

+

+ If the control contains an icon, Bulma will make sure the button remains centered, no matter the size of the input or of the icon. +

+
+ {{icons_sizes_example}} +
+
+{% highlight html %} +{{icons_sizes_example}} +{% endhighlight %} +
+
+ +{% capture icons_sizes_right_example %}

- + + +

- + + +

- + + +

- + + +

- -{% endhighlight %} - +{% endcapture %} +
+
+
+

+ By appending the has-icon-right, the icon will be placed on the right side instead. +

+ {{icons_sizes_right_example}} +
+
+{% highlight html %} +{{icons_sizes_right_example}} +{% endhighlight %} +
+

@@ -531,27 +479,25 @@ doc-subtab: form

If you want to attach controls together, use the has-addons modifier on the control container:

-
-

- - - Search - -

-
-{% highlight html %} +{% capture addons_example %}

Search

+{% endcapture %} +
+{{addons_example}} +
+{% highlight html %} +{{addons_example}} {% endhighlight %}

You can attach inputs, buttons, and dropdowns only.

Use the is-expanded modifier on the element you want to fill up the remaing space (in this case, the input):

-
+{% capture addons_expanded_example %}

@@ -580,11 +524,17 @@ doc-subtab: form Transfer

+{% endcapture %} +
+{{addons_expanded_example}} +
+{% highlight html %} +{{addons_expanded_example}} {% endhighlight %}

Use the has-addons-centered or the has-addons-right modifers to alter the alignment.

-
+{% capture addons_center_example %}

- - - - - - - - Transfer - -

+{{addons_center_example}} {% endhighlight %} -
+{% capture addons_right_example %}

- - - - - - - - Transfer - -

+{{addons_right_example}} {% endhighlight %}
@@ -651,7 +583,7 @@ doc-subtab: form

If you want to group controls together, use the is-grouped modifier on the control container:

-
+{% capture group_example %}

@@ -662,18 +594,12 @@ doc-subtab: form

+{% endcapture %} +
+{{group_example}}
{% highlight html %} -
-

- -

-

- - Search - -

-
+{{group_example}} {% endhighlight %}

Add the is-expanded modifier on the control element you want to fill up the remaining space.

@@ -694,40 +620,7 @@ doc-subtab: form

You can of course use is-grouped or has-addons for the child elements.

-
-
- -
-
-

- -

-

- -

-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
- -
-
-{% highlight html %} +{% capture horizontal_form_example %}
@@ -761,6 +654,10 @@ doc-subtab: form
+{% endcapture %} +{{horizontal_form_example}} +{% highlight html %} +{{horizontal_form_example}} {% endhighlight %}
diff --git a/sass/elements/content.sass b/sass/elements/content.sass index aeb26620f..86f32a824 100644 --- a/sass/elements/content.sass +++ b/sass/elements/content.sass @@ -11,10 +11,11 @@ li + li margin-top: 0.25em // Block - blockquote, p, ol, - ul + ul, + blockquote, + table &:not(:last-child) margin-bottom: 1em h1, @@ -69,6 +70,36 @@ margin-top: 0.5em ul list-style-type: square + table + width: 100% + td, + th + border: 1px solid $border + border-width: 0 0 1px + padding: 0.5em 0.75em + vertical-align: top + th + color: $text-strong + text-align: left + tr + &:hover + background-color: $background + thead + td, + th + border-width: 0 0 2px + color: $text-strong + tfoot + td, + th + border-width: 2px 0 0 + color: $text-strong + tbody + tr + &:last-child + td, + th + border-bottom-width: 0 // Sizes &.is-small font-size: $size-small diff --git a/sass/elements/form.sass b/sass/elements/form.sass index de823feb2..b6fcc1475 100644 --- a/sass/elements/form.sass +++ b/sass/elements/form.sass @@ -15,7 +15,7 @@ $input-disabled-border: $background !default $input-arrow: $link !default $input-icon: $grey-lighter !default -$input-icon-active: $grey-light !default +$input-icon-active: $grey !default $input-radius: $radius !default @@ -219,59 +219,55 @@ $input-radius: $radius !default flex-grow: 1 flex-shrink: 0 &.has-icon - & > .fa - +fa(14px, 24px) + .icon color: $input-icon pointer-events: none position: absolute - top: 4px + top: ($size-normal * 2.5) / 2 z-index: 4 .input - &:focus + .fa - color: $input-icon-active - &.is-small + .fa - font-size: 10.5px - top: 0 - &.is-medium + .fa - font-size: 21px - top: 8px - &.is-large + .fa - font-size: 21px - top: 12px + &:focus + & + .icon + color: $input-icon-active + &.is-small + & + .icon + top: ($size-small * 2.5) / 2 + &.is-medium + & + .icon + top: ($size-medium * 2.5) / 2 + &.is-large + & + .icon + top: ($size-large * 2.5) / 2 &:not(.has-icon-right) - & > .fa - left: 4px + .icon + left: ($size-normal * 2.5) / 2 + transform: translateX(-50%) translateY(-50%) .input - padding-left: 32px + padding-left: 2.5em &.is-small - padding-left: 24px - & + .fa - left: 0 + & + .icon + left: ($size-small * 2.5) / 2 &.is-medium - padding-left: 40px - & + .fa - left: 8px + & + .icon + left: ($size-medium * 2.5) / 2 &.is-large - padding-left: 48px - & + .fa - left: 12px + & + .icon + left: ($size-large * 2.5) / 2 &.has-icon-right - & > .fa - right: 4px + .icon + right: ($size-normal * 2.5) / 2 + transform: translateX(50%) translateY(-50%) .input - padding-right: 32px + padding-right: 2.5em &.is-small - padding-right: 24px - & + .fa - right: 0 + & + .icon + right: ($size-small * 2.5) / 2 &.is-medium - padding-right: 40px - & + .fa - right: 8px + & + .icon + right: ($size-medium * 2.5) / 2 &.is-large - padding-right: 48px - & + .fa - right: 12px + & + .icon + right: ($size-large * 2.5) / 2 &.is-grouped display: flex justify-content: flex-start diff --git a/sass/elements/icon.sass b/sass/elements/icon.sass index 2b1093bf9..1f0bab0c3 100644 --- a/sass/elements/icon.sass +++ b/sass/elements/icon.sass @@ -1,5 +1,5 @@ .icon - background: pink + background: $background +fa(21px, 1.5rem) .fa font-size: inherit diff --git a/sass/elements/table.sass b/sass/elements/table.sass index 65d2c0272..b50c152d2 100644 --- a/sass/elements/table.sass +++ b/sass/elements/table.sass @@ -34,17 +34,17 @@ $table-row-even-hover-background: $white-ter !default th border-width: 0 0 2px color: $table-head + tfoot + td, + th + border-width: 2px 0 0 + color: $table-head tbody tr &:last-child td, th border-bottom-width: 0 - tfoot - td, - th - border-width: 2px 0 0 - color: $table-head // Modifiers &.is-bordered td,