diff --git a/docs/css/bulma-docs.css b/docs/css/bulma-docs.css index be9d2ec5..67c5dcaa 100644 --- a/docs/css/bulma-docs.css +++ b/docs/css/bulma-docs.css @@ -2888,6 +2888,25 @@ a.box:active { border-width: 0 1px 1px; } +.file.is-right .file-cta { + border-radius: 0 3px 3px 0; +} + +.file.is-right .file-name { + border-radius: 3px 0 0 3px; + border-width: 1px 0 1px 1px; + order: -1; +} + +.file.is-fullwidth .file-label { + width: 100%; +} + +.file.is-fullwidth .file-name { + flex-grow: 1; + max-width: none; +} + .file-label { align-items: stretch; display: flex; @@ -2898,21 +2917,21 @@ a.box:active { } .file-label:hover .file-cta { - background-color: #eeeeee; + background-color: #ff2b56; color: #363636; } .file-label:hover .file-name { - border-color: #eeeeee; + border-color: #ff2b56; } .file-label:active .file-cta { - background-color: #e8e8e8; + background-color: #ff1f4b; color: #363636; } .file-label:active .file-name { - border-color: #e8e8e8; + border-color: #ff1f4b; } .file-input { @@ -2965,12 +2984,12 @@ a.box:active { } .file-cta { - background-color: whitesmoke; + background-color: #ff3860; color: #4a4a4a; } .file-name { - border-color: whitesmoke; + border-color: #ff3860; border-style: solid; border-width: 1px 1px 1px 0; display: block; diff --git a/docs/documentation/form/file.html b/docs/documentation/form/file.html index f920b928..f7e0e431 100644 --- a/docs/documentation/form/file.html +++ b/docs/documentation/form/file.html @@ -62,6 +62,44 @@ variables: {% endcapture %} +{% capture file_name_right %} +
+ +
+{% endcapture %} + +{% capture file_name_fullwidth %} +
+ +
+{% endcapture %} + {% capture file_centered %}
+
+
+
+

+ You can move the CTA to the right side with the .is-right modifier. +

+
+
+ {{ file_name_right }} +
+
+
+ {% highlight html %}{{ file_name_right }}{% endhighlight %} +
+
+ +
+
+
+

+ You can also expand the name to fill up the space with the .is-fullwidth modifier. +

+
+
+ {{ file_name_fullwidth }} +
+
+
+ {% highlight html %}{{ file_name_fullwidth }}{% endhighlight %} +
+
+
diff --git a/sass/elements/form.sass b/sass/elements/form.sass index 3e99fd54..c1897e62 100755 --- a/sass/elements/form.sass +++ b/sass/elements/form.sass @@ -23,7 +23,7 @@ $input-radius: $radius !default $file-border-color: transparent !default $file-radius: $radius !default -$file-cta-background-color: $white-ter !default +$file-cta-background-color: $red !default $file-cta-color: $grey-dark !default $file-cta-hover-color: $grey-darker !default $file-cta-active-color: $grey-darker !default @@ -278,6 +278,19 @@ $help-size: $size-small !default .file-name border-radius: 0 0 $file-radius $file-radius border-width: 0 1px 1px + &.is-right + .file-cta + border-radius: 0 $file-radius $file-radius 0 + .file-name + border-radius: $file-radius 0 0 $file-radius + border-width: 1px 0 1px 1px + order: -1 + &.is-fullwidth + .file-label + width: 100% + .file-name + flex-grow: 1 + max-width: none .file-label align-items: stretch