diff --git a/docs/css/bulma-docs.css b/docs/css/bulma-docs.css index f65bcb21..be9d2ec5 100644 --- a/docs/css/bulma-docs.css +++ b/docs/css/bulma-docs.css @@ -2594,6 +2594,222 @@ a.box:active { position: relative; } +.file.is-white .file-cta { + background-color: white; + border-color: transparent; + color: #0a0a0a; +} + +.file.is-white:hover .file-cta, .file.is-white.is-hovered .file-cta { + background-color: #f9f9f9; + border-color: transparent; + color: #0a0a0a; +} + +.file.is-white:focus .file-cta, .file.is-white.is-focused .file-cta { + border-color: transparent; + box-shadow: 0 0 0.5em rgba(255, 255, 255, 0.25); + color: #0a0a0a; +} + +.file.is-white:active .file-cta, .file.is-white.is-active .file-cta { + background-color: #f2f2f2; + border-color: transparent; + color: #0a0a0a; +} + +.file.is-black .file-cta { + background-color: #0a0a0a; + border-color: transparent; + color: white; +} + +.file.is-black:hover .file-cta, .file.is-black.is-hovered .file-cta { + background-color: #040404; + border-color: transparent; + color: white; +} + +.file.is-black:focus .file-cta, .file.is-black.is-focused .file-cta { + border-color: transparent; + box-shadow: 0 0 0.5em rgba(10, 10, 10, 0.25); + color: white; +} + +.file.is-black:active .file-cta, .file.is-black.is-active .file-cta { + background-color: black; + border-color: transparent; + color: white; +} + +.file.is-light .file-cta { + background-color: whitesmoke; + border-color: transparent; + color: #363636; +} + +.file.is-light:hover .file-cta, .file.is-light.is-hovered .file-cta { + background-color: #eeeeee; + border-color: transparent; + color: #363636; +} + +.file.is-light:focus .file-cta, .file.is-light.is-focused .file-cta { + border-color: transparent; + box-shadow: 0 0 0.5em rgba(245, 245, 245, 0.25); + color: #363636; +} + +.file.is-light:active .file-cta, .file.is-light.is-active .file-cta { + background-color: #e8e8e8; + border-color: transparent; + color: #363636; +} + +.file.is-dark .file-cta { + background-color: #363636; + border-color: transparent; + color: whitesmoke; +} + +.file.is-dark:hover .file-cta, .file.is-dark.is-hovered .file-cta { + background-color: #2f2f2f; + border-color: transparent; + color: whitesmoke; +} + +.file.is-dark:focus .file-cta, .file.is-dark.is-focused .file-cta { + border-color: transparent; + box-shadow: 0 0 0.5em rgba(54, 54, 54, 0.25); + color: whitesmoke; +} + +.file.is-dark:active .file-cta, .file.is-dark.is-active .file-cta { + background-color: #292929; + border-color: transparent; + color: whitesmoke; +} + +.file.is-primary .file-cta { + background-color: #00d1b2; + border-color: transparent; + color: #fff; +} + +.file.is-primary:hover .file-cta, .file.is-primary.is-hovered .file-cta { + background-color: #00c4a7; + border-color: transparent; + color: #fff; +} + +.file.is-primary:focus .file-cta, .file.is-primary.is-focused .file-cta { + border-color: transparent; + box-shadow: 0 0 0.5em rgba(0, 209, 178, 0.25); + color: #fff; +} + +.file.is-primary:active .file-cta, .file.is-primary.is-active .file-cta { + background-color: #00b89c; + border-color: transparent; + color: #fff; +} + +.file.is-info .file-cta { + background-color: #3273dc; + border-color: transparent; + color: #fff; +} + +.file.is-info:hover .file-cta, .file.is-info.is-hovered .file-cta { + background-color: #276cda; + border-color: transparent; + color: #fff; +} + +.file.is-info:focus .file-cta, .file.is-info.is-focused .file-cta { + border-color: transparent; + box-shadow: 0 0 0.5em rgba(50, 115, 220, 0.25); + color: #fff; +} + +.file.is-info:active .file-cta, .file.is-info.is-active .file-cta { + background-color: #2366d1; + border-color: transparent; + color: #fff; +} + +.file.is-success .file-cta { + background-color: #23d160; + border-color: transparent; + color: #fff; +} + +.file.is-success:hover .file-cta, .file.is-success.is-hovered .file-cta { + background-color: #22c65b; + border-color: transparent; + color: #fff; +} + +.file.is-success:focus .file-cta, .file.is-success.is-focused .file-cta { + border-color: transparent; + box-shadow: 0 0 0.5em rgba(35, 209, 96, 0.25); + color: #fff; +} + +.file.is-success:active .file-cta, .file.is-success.is-active .file-cta { + background-color: #20bc56; + border-color: transparent; + color: #fff; +} + +.file.is-warning .file-cta { + background-color: #ffdd57; + border-color: transparent; + color: rgba(0, 0, 0, 0.7); +} + +.file.is-warning:hover .file-cta, .file.is-warning.is-hovered .file-cta { + background-color: #ffdb4a; + border-color: transparent; + color: rgba(0, 0, 0, 0.7); +} + +.file.is-warning:focus .file-cta, .file.is-warning.is-focused .file-cta { + border-color: transparent; + box-shadow: 0 0 0.5em rgba(255, 221, 87, 0.25); + color: rgba(0, 0, 0, 0.7); +} + +.file.is-warning:active .file-cta, .file.is-warning.is-active .file-cta { + background-color: #ffd83d; + border-color: transparent; + color: rgba(0, 0, 0, 0.7); +} + +.file.is-danger .file-cta { + background-color: #ff3860; + border-color: transparent; + color: #fff; +} + +.file.is-danger:hover .file-cta, .file.is-danger.is-hovered .file-cta { + background-color: #ff2b56; + border-color: transparent; + color: #fff; +} + +.file.is-danger:focus .file-cta, .file.is-danger.is-focused .file-cta { + border-color: transparent; + box-shadow: 0 0 0.5em rgba(255, 56, 96, 0.25); + color: #fff; +} + +.file.is-danger:active .file-cta, .file.is-danger.is-active .file-cta { + background-color: #ff1f4b; + border-color: transparent; + color: #fff; +} + .file.is-small { font-size: 0.75rem; } diff --git a/docs/documentation/form/file.html b/docs/documentation/form/file.html index 6acb0088..f920b928 100644 --- a/docs/documentation/form/file.html +++ b/docs/documentation/form/file.html @@ -97,6 +97,78 @@ variables: {% endcapture %} +{% capture file_colors %} +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+{% endcapture %} + {% capture file_sizes %}
@@ -397,7 +469,7 @@ variables: include meta.html experimental=true since="0.5.1" - colors=false + colors=true sizes=true variables=true %} @@ -500,6 +572,31 @@ variables:
+ {% include heading.html name="Colors" %} + +
+
+
+

+ You can style the file element by appending one of the 9 color modifiers: +

+
    + {% for color in site.colors %} +
  • + is-{{ color }} +
  • + {% endfor %} +
+
+
+ {{ file_colors }} +
+
+
+ {% highlight html %}{{ file_colors }}{% endhighlight %} +
+
+ {% include heading.html name="Sizes" %}
diff --git a/sass/elements/form.sass b/sass/elements/form.sass index 949261fe..3e99fd54 100755 --- a/sass/elements/form.sass +++ b/sass/elements/form.sass @@ -200,6 +200,34 @@ $help-size: $size-small !default display: flex justify-content: flex-start position: relative + // Colors + @each $name, $pair in $colors + $color: nth($pair, 1) + $color-invert: nth($pair, 2) + &.is-#{$name} + .file-cta + background-color: $color + border-color: transparent + color: $color-invert + &:hover, + &.is-hovered + .file-cta + background-color: darken($color, 2.5%) + border-color: transparent + color: $color-invert + &:focus, + &.is-focused + .file-cta + border-color: transparent + box-shadow: 0 0 0.5em rgba($color, 0.25) + color: $color-invert + &:active, + &.is-active + .file-cta + background-color: darken($color, 5%) + border-color: transparent + color: $color-invert + // Sizes &.is-small font-size: $size-small &.is-medium @@ -212,6 +240,7 @@ $help-size: $size-small !default .file-icon .fa font-size: 28px + // Modifiers &.has-name .file-cta border-bottom-right-radius: 0