![]() |
VOOZH | about |
Bulma is a free, open-source CSS framework based on Flexbox. It is component rich, compatible, and well documented. It is highly responsive in nature. It uses classes to implement its design.
The file element is used to upload custom file input. The ‘file’ component comprises several sub-elements that we have to add exclusively to design our content well.
These elements are listed below.
Variable Used:
| Name | Description | Type | Value | Computed Value | Computed Type |
|---|---|---|---|---|---|
| $file-border-color | This variable is used to provide border color to the file. | variable | $border | hsl(0, 0%, 86%) | color |
| $file-radius | This variable is used to provide a radius to the file. | variable | $radius | 4px | size |
| $file-cta-background-color | This variable is used to provide background color to the file. | variable | $white-ter | hsl(0, 0%, 96%) | color |
| $file-cta-color | This variable is used to provide color to the file. | variable | $grey-dark | hsl(0, 0%, 29%) | color |
| $file-cta-hover-color | This variable is used to provide color on hover to file. | variable | $grey-darker | hsl(0, 0%, 21%) | color |
| $file-cta-active-color | This variable is used to provide color to the active file. | variable | $grey-darker | hsl(0, 0%, 21%) | color |
| $file-name-border-color | This variable is used to provide border color to the file name. | variable | $border | hsl(0, 0%, 86%) | color |
| $file-name-border-style | This variable is used to provide border style to the file name. | string | solid | ||
| $file-name-border-width | This variable is used to provide border width to the file name. | size | 1px 1px 1px 0 | ||
| $file-name-max-width | This variable is used to provide the max width of file name. | size | 16em |
Example 1: In the below code, we will make use of the above variable to modify the file.
SCSS Code:
$file-cta-background-color:green;
.container {
background-color:$file-cta-background-color;
}
Compiled CSS Code:
.container {
background-color: green;
}
Output:
Example 2: In the below code, we will make use of the above variable to modify the file.
SCSS Code:
$file-name-border-width:5px solid green;
.container {
border:$file-name-border-width;
}
Compiled CSS Code:
.container {
border: 5px solid green;
}
Output:
Reference: https://bulma.io/documentation/form/file/