Toolchain and environment update

Development environment has been Windows for months, just recently moved to UbuntuGnome 16.04 (LTS), so most of the files have been altered a little bit (line endings etc.). Similarly, my toolchain which was Atom (formerly SublimeText), SourceTree and Koala has been changed to Atom, GitKraken and Prepros, causing certain things to recompile and reconfigure based on said tools. New branch has been created under `dev211` to work on the next release `v2.1.1`.
This commit is contained in:
Angelos Chalaris 2017-03-29 20:59:51 +03:00
parent 13c2aaa9af
commit 357553c7b3
42 changed files with 12535 additions and 12587 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
prepros-6\.config

View file

@ -1,3 +1,3 @@
docs/v1
docs/v2
docs/v1
docs/v2
docs/page_thumb.png

View file

@ -1,64 +1,64 @@
# Changelog
## v2.1.0
- Added a `.tooltip` component in the `contextual` module (#41).
- Added a predefined layouts in the `grid` module (#53).
- Added `.sticky` functionality to `navigation` module's headers and footers (#26).
- Added `.fluid` input group component to `input_control` module (#50).
- Added proper documentation for a media object in the `grid` module (#22).
- Updated a lot of the documentation to include ARIA guidelines. Updated button elements, so that `role="button"` creates buttons same as the class (#40).
- Updated **mini-default** and **mini-sucroa** flavors to the latest version of the framework.
- Added **mini-classic** flavor.
- Changed the styling of `<nav>` to include a left border sidebar for subcategories.
- Updated selectors in many places and optimized parts of the codebase.
- Added conditional flags to enable or disable several components.
- Added documentation and workarounds for certain table issues (#54).
- Redesigned parts of the documentation to make it display better on certain devices (#58).
## v2.0.2
- Added a new flavor, **sucroa**.
- Updated color palette for **default** flavor to deal with colorblindness issues.
- Added hugging cat.
## v2.0.1
- Updated module structure. `_core.scss` no longer contains all `@import` statements, but they are now included in the flavor files.
- Updated documentation for customization to reflect said changes.
## v2.0.0
- New version, rebuilt from scratch.
- Breaking changes in legacy browser compatibility.
- Full module and component redesign and restructure.
- New documentation and demo pages.
## v1.1.0
- Fixed a problem with disabled buttons not behaving properly (issue #7).
- Added support for `:disabled` pseudo-class for elements with disabled styles (issue #8).
- Added support for `:active` and `:focus` for the close utility class (issue #9).
- New module: Spinners (component comes in two styles) - part of the extra modules.
- Removed the `flavor.scss` file from the `/scss` directory. Default flavor base will be `/flavors/mini-default.scss`.
- Added hover styling and pointer cursor to the thumbnail styling (issue #10).
- Minor change to caret styling (should be virtually identical).
- Updated accordion definitions for consistency.
- Updated label style definitions for consistency.
- Minor changes to progress component styling (should be virtually identical).
- Minor changes to panel component styling (should be virtually identical).
- Bootstrap flavor added.
## v1.0.2
- Refactoring patch (all version will now use vMajor.Minor.Patch instead of just Major.Minor.Patch). Changes will be reflected in the updated links.
## v1.0.1
- Fixed modals covering other elements due to `z-index` (issue #3).
- Fixed label & badge display overlapping in smaller displays (issue #4).
- Fixed display of demo pages and incorrect padding of elements in panels (issue #5).
## v1.0.0
- Initial release.
# Changelog
## v2.1.0
- Added a `.tooltip` component in the `contextual` module (#41).
- Added a predefined layouts in the `grid` module (#53).
- Added `.sticky` functionality to `navigation` module's headers and footers (#26).
- Added `.fluid` input group component to `input_control` module (#50).
- Added proper documentation for a media object in the `grid` module (#22).
- Updated a lot of the documentation to include ARIA guidelines. Updated button elements, so that `role="button"` creates buttons same as the class (#40).
- Updated **mini-default** and **mini-sucroa** flavors to the latest version of the framework.
- Added **mini-classic** flavor.
- Changed the styling of `<nav>` to include a left border sidebar for subcategories.
- Updated selectors in many places and optimized parts of the codebase.
- Added conditional flags to enable or disable several components.
- Added documentation and workarounds for certain table issues (#54).
- Redesigned parts of the documentation to make it display better on certain devices (#58).
## v2.0.2
- Added a new flavor, **sucroa**.
- Updated color palette for **default** flavor to deal with colorblindness issues.
- Added hugging cat.
## v2.0.1
- Updated module structure. `_core.scss` no longer contains all `@import` statements, but they are now included in the flavor files.
- Updated documentation for customization to reflect said changes.
## v2.0.0
- New version, rebuilt from scratch.
- Breaking changes in legacy browser compatibility.
- Full module and component redesign and restructure.
- New documentation and demo pages.
## v1.1.0
- Fixed a problem with disabled buttons not behaving properly (issue #7).
- Added support for `:disabled` pseudo-class for elements with disabled styles (issue #8).
- Added support for `:active` and `:focus` for the close utility class (issue #9).
- New module: Spinners (component comes in two styles) - part of the extra modules.
- Removed the `flavor.scss` file from the `/scss` directory. Default flavor base will be `/flavors/mini-default.scss`.
- Added hover styling and pointer cursor to the thumbnail styling (issue #10).
- Minor change to caret styling (should be virtually identical).
- Updated accordion definitions for consistency.
- Updated label style definitions for consistency.
- Minor changes to progress component styling (should be virtually identical).
- Minor changes to panel component styling (should be virtually identical).
- Bootstrap flavor added.
## v1.0.2
- Refactoring patch (all version will now use vMajor.Minor.Patch instead of just Major.Minor.Patch). Changes will be reflected in the updated links.
## v1.0.1
- Fixed modals covering other elements due to `z-index` (issue #3).
- Fixed label & badge display overlapping in smaller displays (issue #4).
- Fixed display of demo pages and incorrect padding of elements in panels (issue #5).
## v1.0.0
- Initial release.

42
LICENSE
View file

@ -1,21 +1,21 @@
MIT License
Copyright (c) 2016-2017 Angelos Chalaris
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2016-2017 Angelos Chalaris
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

116
README.md
View file

@ -1,58 +1,58 @@
# mini.css v2.1.0
## A minimal, responsive, style-agnostic CSS toolkit
![Logo](/docs/page_thumb.PNG)
**mini.css** is a tiny CSS toolkit (under 7KB gzipped) that works well on most modern browsers and devices and allows you to customize it quickly and easily. It's written in Sass and tries to make use of HTML5 semantics and modern patterns to deal with common web design problems. You can learn all about using it, its modules and components, as well as see a live demo [here](https://chalarangelo.github.io/mini.css/).
## Setup
**mini.css** is available in both NPM and Bower:
npm install mini.css
bower install mini.css
To try out **mini.css** using the default flavor, copy and paste the following code inside your HTML page's `<head>` tag:
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/version/dist/mini-default.min.css">
Replace `version` with a release tag (`v2.0.0` or later) from the [Releases page](https://github.com/Chalarangelo/mini.css/releases).
Alternatively, you can use one of the other [flavors](https://chalarangelo.github.io/mini.css/flavors.html). Simply replace the final part of the URL with the flavor's CSS file (minified or not) and you're good to go!
## Customization
If you want to develop your own flavor or tweak an existing one, head over to the [Customization page](https://chalarangelo.github.io/mini.css/customization.html) to get started.
## Contributing
### Flavors
To develop your own flavor:
- Fork into your own repository.
- Add a flavor file in the `src/flavors` folder by duplicating an existing file and renaming it to whatever you want to name it. **Make sure there are no naming conflicts between your flavor and any of the existing flavors**.
- Edit the flavor file as you desire.
- Submit a pull request. Please provide a brief description of your flavor and, if possible, a Codepen or some screenshots showcasing some of the styles in it.
To develop a module:
- Module contribution guidelines are very strict at the moment. New modules will only be created upon request and **should always be in a new repository**, unless they are part of a Roadmap of a later version. Please submit an issue before developing a module or asking for new modules, as the discussion of said implementations is key to deciding the direction **mini.css** will follow in the future.
To develop some other part of **mini.css**:
- Create an issue for anything else.
- If you make any changes, submit a pull request with as much information as possible about what you changed.
## Contributors
- Angelos Chalaris (@chalarangelo)
- Angeliki Daskalakis (@angiedaskalakis)
- Rory Primrose (@roryprimrose)
- Sandro Magi (@naasking)
## License
The project is licensed under the [MIT License](https://github.com/Chalarangelo/mini.css/blob/master/LICENSE).
# mini.css v2.1.0
## A minimal, responsive, style-agnostic CSS toolkit
![Logo](/docs/page_thumb.PNG)
**mini.css** is a tiny CSS toolkit (under 7KB gzipped) that works well on most modern browsers and devices and allows you to customize it quickly and easily. It's written in Sass and tries to make use of HTML5 semantics and modern patterns to deal with common web design problems. You can learn all about using it, its modules and components, as well as see a live demo [here](https://chalarangelo.github.io/mini.css/).
## Setup
**mini.css** is available in both NPM and Bower:
npm install mini.css
bower install mini.css
To try out **mini.css** using the default flavor, copy and paste the following code inside your HTML page's `<head>` tag:
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/version/dist/mini-default.min.css">
Replace `version` with a release tag (`v2.0.0` or later) from the [Releases page](https://github.com/Chalarangelo/mini.css/releases).
Alternatively, you can use one of the other [flavors](https://chalarangelo.github.io/mini.css/flavors.html). Simply replace the final part of the URL with the flavor's CSS file (minified or not) and you're good to go!
## Customization
If you want to develop your own flavor or tweak an existing one, head over to the [Customization page](https://chalarangelo.github.io/mini.css/customization.html) to get started.
## Contributing
### Flavors
To develop your own flavor:
- Fork into your own repository.
- Add a flavor file in the `src/flavors` folder by duplicating an existing file and renaming it to whatever you want to name it. **Make sure there are no naming conflicts between your flavor and any of the existing flavors**.
- Edit the flavor file as you desire.
- Submit a pull request. Please provide a brief description of your flavor and, if possible, a Codepen or some screenshots showcasing some of the styles in it.
To develop a module:
- Module contribution guidelines are very strict at the moment. New modules will only be created upon request and **should always be in a new repository**, unless they are part of a Roadmap of a later version. Please submit an issue before developing a module or asking for new modules, as the discussion of said implementations is key to deciding the direction **mini.css** will follow in the future.
To develop some other part of **mini.css**:
- Create an issue for anything else.
- If you make any changes, submit a pull request with as much information as possible about what you changed.
## Contributors
- Angelos Chalaris (@chalarangelo)
- Angeliki Daskalakis (@angiedaskalakis)
- Rory Primrose (@roryprimrose)
- Sandro Magi (@naasking)
## License
The project is licensed under the [MIT License](https://github.com/Chalarangelo/mini.css/blob/master/LICENSE).

View file

@ -1,26 +1,26 @@
{
"name": "mini.css",
"description": "A minimal, responsive, style-agnostic CSS framework.",
"main": "flavors/mini-default.min.css",
"authors": [
"Angelos Chalaris (Chalarangelo)"
],
"license": "MIT",
"keywords": [
"mini.css",
"mini",
"CSS",
"framework",
"toolkit",
"minimal",
"responsive",
"style-agnostic",
"Sass"
],
"ignore": [
"docs/v1",
"docs/v2",
"docs/page_thumb.png"
],
"homepage": "https://chalarangelo.github.io/mini.css/"
}
{
"name": "mini.css",
"description": "A minimal, responsive, style-agnostic CSS framework.",
"main": "flavors/mini-default.min.css",
"authors": [
"Angelos Chalaris (Chalarangelo)"
],
"license": "MIT",
"keywords": [
"mini.css",
"mini",
"CSS",
"framework",
"toolkit",
"minimal",
"responsive",
"style-agnostic",
"Sass"
],
"ignore": [
"docs/v1",
"docs/v2",
"docs/page_thumb.png"
],
"homepage": "https://chalarangelo.github.io/mini.css/"
}

159
dist/mini-default.css vendored
View file

@ -1,11 +1,11 @@
@charset "UTF-8";
/*
Flavor name: Default (mini-default)
Author: Angelos Chalaris (chalarangelo@gmail.com)
mini.css version: v2.1.0 (Fermion)
/*
Flavor name: Default (mini-default)
Author: Angelos Chalaris (chalarangelo@gmail.com)
mini.css version: v2.1.0 (Fermion)
*/
/*
Browsers resets and base typography.
/*
Browsers resets and base typography.
*/
html {
font-size: 16px; }
@ -165,8 +165,8 @@ a {
a:hover, a:focus, a:active {
opacity: 0.75; }
/*
Definitions for the grid system.
/*
Definitions for the grid system.
*/
.container {
margin: 0 auto;
@ -199,6 +199,7 @@ a {
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
padding: 0 4px; } }
@media (min-width: 1280px) {
.row[class*='cols-lg-'] > * {
box-sizing: border-box;
@ -206,6 +207,7 @@ a {
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
padding: 0 4px; } }
.col-sm,
[class^='col-sm-'],
[class^='col-sm-offset-'] {
@ -353,7 +355,6 @@ a {
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
padding: 0 4px; }
.col-md,
.row.cols-md > * {
-webkit-box-flex: 1;
@ -362,126 +363,100 @@ a {
flex-grow: 1;
-webkit-flex-basis: 0;
flex-basis: 0; }
.col-md-1,
.row.cols-md-1 > * {
max-width: 8.33333%;
-webkit-flex-basis: 8.33333%;
flex-basis: 8.33333%; }
.col-md-2,
.row.cols-md-2 > * {
max-width: 16.66667%;
-webkit-flex-basis: 16.66667%;
flex-basis: 16.66667%; }
.col-md-3,
.row.cols-md-3 > * {
max-width: 25%;
-webkit-flex-basis: 25%;
flex-basis: 25%; }
.col-md-4,
.row.cols-md-4 > * {
max-width: 33.33333%;
-webkit-flex-basis: 33.33333%;
flex-basis: 33.33333%; }
.col-md-5,
.row.cols-md-5 > * {
max-width: 41.66667%;
-webkit-flex-basis: 41.66667%;
flex-basis: 41.66667%; }
.col-md-6,
.row.cols-md-6 > * {
max-width: 50%;
-webkit-flex-basis: 50%;
flex-basis: 50%; }
.col-md-7,
.row.cols-md-7 > * {
max-width: 58.33333%;
-webkit-flex-basis: 58.33333%;
flex-basis: 58.33333%; }
.col-md-8,
.row.cols-md-8 > * {
max-width: 66.66667%;
-webkit-flex-basis: 66.66667%;
flex-basis: 66.66667%; }
.col-md-9,
.row.cols-md-9 > * {
max-width: 75%;
-webkit-flex-basis: 75%;
flex-basis: 75%; }
.col-md-10,
.row.cols-md-10 > * {
max-width: 83.33333%;
-webkit-flex-basis: 83.33333%;
flex-basis: 83.33333%; }
.col-md-11,
.row.cols-md-11 > * {
max-width: 91.66667%;
-webkit-flex-basis: 91.66667%;
flex-basis: 91.66667%; }
.col-md-12,
.row.cols-md-12 > * {
max-width: 100%;
-webkit-flex-basis: 100%;
flex-basis: 100%; }
.col-md-offset-0 {
margin-left: 0; }
.col-md-offset-1 {
margin-left: 8.33333%; }
.col-md-offset-2 {
margin-left: 16.66667%; }
.col-md-offset-3 {
margin-left: 25%; }
.col-md-offset-4 {
margin-left: 33.33333%; }
.col-md-offset-5 {
margin-left: 41.66667%; }
.col-md-offset-6 {
margin-left: 50%; }
.col-md-offset-7 {
margin-left: 58.33333%; }
.col-md-offset-8 {
margin-left: 66.66667%; }
.col-md-offset-9 {
margin-left: 75%; }
.col-md-offset-10 {
margin-left: 83.33333%; }
.col-md-offset-11 {
margin-left: 91.66667%; }
.col-md-normal {
-webkit-order: initial;
order: initial; }
.col-md-first {
-webkit-order: -999;
order: -999; }
.col-md-last {
-webkit-order: 999;
order: 999; } }
@media (min-width: 1280px) {
.col-lg,
[class^='col-lg-'],
@ -491,7 +466,6 @@ a {
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
padding: 0 4px; }
.col-lg,
.row.cols-lg > * {
-webkit-box-flex: 1;
@ -500,128 +474,102 @@ a {
flex-grow: 1;
-webkit-flex-basis: 0;
flex-basis: 0; }
.col-lg-1,
.row.cols-lg-1 > * {
max-width: 8.33333%;
-webkit-flex-basis: 8.33333%;
flex-basis: 8.33333%; }
.col-lg-2,
.row.cols-lg-2 > * {
max-width: 16.66667%;
-webkit-flex-basis: 16.66667%;
flex-basis: 16.66667%; }
.col-lg-3,
.row.cols-lg-3 > * {
max-width: 25%;
-webkit-flex-basis: 25%;
flex-basis: 25%; }
.col-lg-4,
.row.cols-lg-4 > * {
max-width: 33.33333%;
-webkit-flex-basis: 33.33333%;
flex-basis: 33.33333%; }
.col-lg-5,
.row.cols-lg-5 > * {
max-width: 41.66667%;
-webkit-flex-basis: 41.66667%;
flex-basis: 41.66667%; }
.col-lg-6,
.row.cols-lg-6 > * {
max-width: 50%;
-webkit-flex-basis: 50%;
flex-basis: 50%; }
.col-lg-7,
.row.cols-lg-7 > * {
max-width: 58.33333%;
-webkit-flex-basis: 58.33333%;
flex-basis: 58.33333%; }
.col-lg-8,
.row.cols-lg-8 > * {
max-width: 66.66667%;
-webkit-flex-basis: 66.66667%;
flex-basis: 66.66667%; }
.col-lg-9,
.row.cols-lg-9 > * {
max-width: 75%;
-webkit-flex-basis: 75%;
flex-basis: 75%; }
.col-lg-10,
.row.cols-lg-10 > * {
max-width: 83.33333%;
-webkit-flex-basis: 83.33333%;
flex-basis: 83.33333%; }
.col-lg-11,
.row.cols-lg-11 > * {
max-width: 91.66667%;
-webkit-flex-basis: 91.66667%;
flex-basis: 91.66667%; }
.col-lg-12,
.row.cols-lg-12 > * {
max-width: 100%;
-webkit-flex-basis: 100%;
flex-basis: 100%; }
.col-lg-offset-0 {
margin-left: 0; }
.col-lg-offset-1 {
margin-left: 8.33333%; }
.col-lg-offset-2 {
margin-left: 16.66667%; }
.col-lg-offset-3 {
margin-left: 25%; }
.col-lg-offset-4 {
margin-left: 33.33333%; }
.col-lg-offset-5 {
margin-left: 41.66667%; }
.col-lg-offset-6 {
margin-left: 50%; }
.col-lg-offset-7 {
margin-left: 58.33333%; }
.col-lg-offset-8 {
margin-left: 66.66667%; }
.col-lg-offset-9 {
margin-left: 75%; }
.col-lg-offset-10 {
margin-left: 83.33333%; }
.col-lg-offset-11 {
margin-left: 91.66667%; }
.col-lg-normal {
-webkit-order: initial;
order: initial; }
.col-lg-first {
-webkit-order: -999;
order: -999; }
.col-lg-last {
-webkit-order: 999;
order: 999; } }
/*
Definitions for navigation elements.
/*
Definitions for navigation elements.
*/
header {
display: block;
@ -714,8 +662,8 @@ header.sticky {
footer.sticky {
bottom: 0; }
/*
Definitions for forms and input elements.
/*
Definitions for forms and input elements.
*/
form {
background: #eeeeee;
@ -768,6 +716,7 @@ label {
align-items: stretch;
-webkit-flex-direction: column;
flex-direction: column; } }
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {
height: auto; }
@ -795,12 +744,15 @@ input:not([type]), [type="text"], [type="email"], [type="number"], [type="search
input:not([type="button"]):not([type="submit"]):not([type="reset"]):hover, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus, textarea:hover, textarea:focus, select:hover, select:focus {
border-color: #0288d1;
box-shadow: none; }
input:not([type="button"]):not([type="submit"]):not([type="reset"]):disabled, input:not([type="button"]):not([type="submit"]):not([type="reset"])[disabled], textarea:disabled, textarea[disabled], select:disabled, select[disabled] {
cursor: not-allowed;
opacity: 0.75; }
input:not([type="button"]):not([type="submit"]):not([type="reset"]):invalid, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus:invalid, textarea:invalid, textarea:focus:invalid, select:invalid, select:focus:invalid {
border-color: #d32f2f;
box-shadow: none; }
input:not([type="button"]):not([type="submit"]):not([type="reset"])[readonly], textarea[readonly], select[readonly] {
background: #e0e0e0;
border-color: #bdbdbd; }
@ -926,6 +878,7 @@ input[type="file"] {
.button-group [role="button"] + .button, .button-group [role="button"] + [role="button"] {
border: 0;
border-top: 1px solid #9e9e9e; } }
[type="checkbox"], [type="radio"] {
height: 1px;
width: 1px;
@ -954,14 +907,18 @@ input[type="file"] {
margin-left: -20px; }
.input-group [type="checkbox"] + label:hover:before, .input-group [type="checkbox"] + label:active:before, .input-group [type="checkbox"] + label:focus:before, .input-group [type="radio"] + label:hover:before, .input-group [type="radio"] + label:active:before, .input-group [type="radio"] + label:focus:before {
border-color: #0288d1; }
.input-group [type="checkbox"]:focus + label:before, .input-group [type="radio"]:focus + label:before {
border-color: #0288d1; }
.input-group [type="radio"] + label:before, .input-group [type="radio"] + label:after {
border-radius: 50%; }
.input-group [type="checkbox"][disabled] + label, .input-group [type="radio"][disabled] + label {
cursor: not-allowed; }
.input-group [type="checkbox"][disabled] + label:before, .input-group [type="checkbox"][disabled] + label:after, .input-group [type="radio"][disabled] + label:before, .input-group [type="radio"][disabled] + label:after {
opacity: 0.75; }
.input-group [type="checkbox"]:checked + label:after, .input-group [type="radio"]:checked + label:after {
margin-left: -20px;
position: absolute;
@ -972,8 +929,8 @@ input[type="file"] {
background: #212121;
content: ''; }
/*
Custom elements for forms and input elements.
/*
Custom elements for forms and input elements.
*/
button.primary, [type="button"].primary, [type="submit"].primary,
[type="reset"].primary, .button.primary, [role="button"].primary {
@ -1027,8 +984,8 @@ button.large, [type="button"].large, [type="submit"].large,
padding: 12px 18px;
margin: 10px 8px; }
/*
Definitions for the responsive table component.
/*
Definitions for the responsive table component.
*/
table {
border-collapse: separate;
@ -1088,6 +1045,7 @@ table {
font-weight: 700; }
table:not(.preset) td:last-child {
border-bottom: 0; } }
@media (min-width: 768px) {
table.horizontal {
display: -webkit-box;
@ -1146,6 +1104,7 @@ table {
padding-left: 0; }
table.horizontal tbody tr:first-child > td {
padding-left: 20px; } }
@media (max-width: 767px) {
table.horizontal.preset {
display: -webkit-box;
@ -1201,14 +1160,16 @@ table {
text-align: right; }
table.horizontal.preset tbody tr:first-child > td {
padding-left: 20px; } }
table.striped tr:nth-of-type(2n) > td {
background: #eeeeee; }
@media (max-width: 767px) {
table.striped:not(.preset) tr:nth-of-type(2n) {
background: #eeeeee; } }
/*
Definitions for cards and containers.
/*
Definitions for cards and containers.
*/
.card {
display: -webkit-box;
@ -1248,15 +1209,18 @@ table.striped tr:nth-of-type(2n) > td {
@media (min-width: 320px) {
.card {
max-width: 320px; } }
/*
Custom elements for cards and containers.
/*
Custom elements for cards and containers.
*/
@media (min-width: 480px) {
.card.large {
max-width: 480px; } }
@media (min-width: 240px) {
.card.small {
max-width: 240px; } }
.card.fluid {
max-width: 100%;
width: auto; }
@ -1279,8 +1243,8 @@ table.striped tr:nth-of-type(2n) > td {
.card > .section.double-padded {
padding: 10px 12px 10px; }
/*
Definitions for tabs/horizontal accordions.
/*
Definitions for tabs/horizontal accordions.
*/
.tabs {
width: 100%;
@ -1330,8 +1294,8 @@ table.striped tr:nth-of-type(2n) > td {
transform: scaleY(0);
-webkit-transform-origin: top;
transform-origin: top;
-webkit-transition: -webkit-transform 0.3s ease 0s, transform 0.3s ease 0s;
transition: -webkit-transform 0.3s ease 0s, transform 0.3s ease 0s; }
-webkit-transition: -webkit-transform 0.3s ease 0s, transform 0.3s ease 0s;
transition: -webkit-transform 0.3s ease 0s, transform 0.3s ease 0s; }
.tabs > [type="radio"] + label + div + [type="radio"] + label, .tabs.stacked > [type="checkbox"] + label + div + [type="radio"] + label {
border-left: 0; }
.tabs.stacked > [type="checkbox"] + label + div + [type="checkbox"] + label {
@ -1389,8 +1353,9 @@ table.striped tr:nth-of-type(2n) > td {
.tabs > [type="radio"] + label + div + [type="radio"] + label {
border: 1px solid #9e9e9e;
border-top: 0; } }
/*
Definitions for contextual background elements and alerts.
/*
Definitions for contextual background elements and alerts.
*/
mark {
background: #0277bd;
@ -1414,6 +1379,7 @@ mark {
-webkit-transform: scale(1); }
100% {
-webkit-transform: scale(1); } }
@keyframes alert-anim {
0% {
transform: scale(1); }
@ -1425,6 +1391,7 @@ mark {
transform: scale(1); }
100% {
transform: scale(1); } }
.alert {
display: block;
background: #eeeeee;
@ -1490,8 +1457,9 @@ mark {
.tooltip:before {
left: -webkit-calc(50% - 6px);
left: calc(50% - 6px); } }
/*
Custom contextual background elements and alerts.
/*
Custom contextual background elements and alerts.
*/
mark.secondary {
background: #e53935; }
@ -1521,8 +1489,8 @@ mark.inline-block {
.alert.critical {
border: 1px solid #d50000; }
/*
Definitions for progress elements and spinners.
/*
Definitions for progress elements and spinners.
*/
progress {
display: block;
@ -1558,16 +1526,19 @@ progress {
width: -webkit-calc(100% - 2*8px);
width: calc(100% - 2*8px);
margin: 2px 8px; } }
@-webkit-keyframes spinner-donut-anim {
0% {
-webkit-transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg); } }
@keyframes spinner-donut-anim {
0% {
transform: rotate(0deg); }
100% {
transform: rotate(360deg); } }
.spinner-donut {
display: inline-block;
border: 4px solid #e3f2fd;
@ -1578,8 +1549,8 @@ progress {
-webkit-animation: spinner-donut-anim 1.2s linear infinite;
animation: spinner-donut-anim 1.2s linear infinite; }
/*
Custom elements for progress elements and spinners.
/*
Custom elements for progress elements and spinners.
*/
progress.inline {
display: inline-block;
@ -1629,8 +1600,8 @@ progress.nano {
width: 32px;
height: 32px; }
/*
Definitions for utilities and helper classes.
/*
Definitions for utilities and helper classes.
*/
.hidden {
display: none !important; }
@ -1723,8 +1694,8 @@ ul.breadcrumbs {
-webkit-transform: rotateZ(-45deg);
transform: rotateZ(-45deg); }
/*
Custom elements for utilities and helper classes.
/*
Custom elements for utilities and helper classes.
*/
.bordered {
border: 1px solid rgba(0, 0, 0, 0.25) !important; }
@ -1741,18 +1712,22 @@ ul.breadcrumbs {
@media (min-width: 768px) {
.responsive-margin {
margin: 6px !important; } }
@media (min-width: 1280px) {
.responsive-margin {
margin: 8px !important; } }
.responsive-padding {
padding: 2px 4px !important; }
@media (min-width: 768px) {
.responsive-padding {
padding: 4px 6px !important; } }
@media (min-width: 1280px) {
.responsive-padding {
padding: 6px 8px !important; } }
.shadow-none {
box-shadow: none !important; }

File diff suppressed because one or more lines are too long

155
dist/mini-sucroa.css vendored
View file

@ -1,12 +1,12 @@
@charset "UTF-8";
/*
Flavor name: Sucroa (mini-sucroa)
Author: Angeliki Daskalakis
mini.css version: v2.1.0 (Fermion)
/*
Flavor name: Sucroa (mini-sucroa)
Author: Angeliki Daskalakis
mini.css version: v2.1.0 (Fermion)
*/
@import url("https://fonts.googleapis.com/css?family=Cousine:400,400i,700|Libre+Baskerville:400,400i,700&subset=latin-ext");
/*
Browsers resets and base typography.
/*
Browsers resets and base typography.
*/
html {
font-size: 16px; }
@ -167,8 +167,8 @@ a {
a:hover, a:focus, a:active {
opacity: 0.75; }
/*
Definitions for the grid system.
/*
Definitions for the grid system.
*/
.container {
margin: 0 auto;
@ -201,6 +201,7 @@ a {
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
padding: 0 4px; } }
@media (min-width: 1280px) {
.row[class*='cols-lg-'] > * {
box-sizing: border-box;
@ -208,6 +209,7 @@ a {
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
padding: 0 4px; } }
.col-sm,
[class^='col-sm-'],
[class^='col-sm-offset-'] {
@ -355,7 +357,6 @@ a {
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
padding: 0 4px; }
.col-md,
.row.cols-md > * {
-webkit-box-flex: 1;
@ -364,126 +365,100 @@ a {
flex-grow: 1;
-webkit-flex-basis: 0;
flex-basis: 0; }
.col-md-1,
.row.cols-md-1 > * {
max-width: 8.33333%;
-webkit-flex-basis: 8.33333%;
flex-basis: 8.33333%; }
.col-md-2,
.row.cols-md-2 > * {
max-width: 16.66667%;
-webkit-flex-basis: 16.66667%;
flex-basis: 16.66667%; }
.col-md-3,
.row.cols-md-3 > * {
max-width: 25%;
-webkit-flex-basis: 25%;
flex-basis: 25%; }
.col-md-4,
.row.cols-md-4 > * {
max-width: 33.33333%;
-webkit-flex-basis: 33.33333%;
flex-basis: 33.33333%; }
.col-md-5,
.row.cols-md-5 > * {
max-width: 41.66667%;
-webkit-flex-basis: 41.66667%;
flex-basis: 41.66667%; }
.col-md-6,
.row.cols-md-6 > * {
max-width: 50%;
-webkit-flex-basis: 50%;
flex-basis: 50%; }
.col-md-7,
.row.cols-md-7 > * {
max-width: 58.33333%;
-webkit-flex-basis: 58.33333%;
flex-basis: 58.33333%; }
.col-md-8,
.row.cols-md-8 > * {
max-width: 66.66667%;
-webkit-flex-basis: 66.66667%;
flex-basis: 66.66667%; }
.col-md-9,
.row.cols-md-9 > * {
max-width: 75%;
-webkit-flex-basis: 75%;
flex-basis: 75%; }
.col-md-10,
.row.cols-md-10 > * {
max-width: 83.33333%;
-webkit-flex-basis: 83.33333%;
flex-basis: 83.33333%; }
.col-md-11,
.row.cols-md-11 > * {
max-width: 91.66667%;
-webkit-flex-basis: 91.66667%;
flex-basis: 91.66667%; }
.col-md-12,
.row.cols-md-12 > * {
max-width: 100%;
-webkit-flex-basis: 100%;
flex-basis: 100%; }
.col-md-offset-0 {
margin-left: 0; }
.col-md-offset-1 {
margin-left: 8.33333%; }
.col-md-offset-2 {
margin-left: 16.66667%; }
.col-md-offset-3 {
margin-left: 25%; }
.col-md-offset-4 {
margin-left: 33.33333%; }
.col-md-offset-5 {
margin-left: 41.66667%; }
.col-md-offset-6 {
margin-left: 50%; }
.col-md-offset-7 {
margin-left: 58.33333%; }
.col-md-offset-8 {
margin-left: 66.66667%; }
.col-md-offset-9 {
margin-left: 75%; }
.col-md-offset-10 {
margin-left: 83.33333%; }
.col-md-offset-11 {
margin-left: 91.66667%; }
.col-md-normal {
-webkit-order: initial;
order: initial; }
.col-md-first {
-webkit-order: -999;
order: -999; }
.col-md-last {
-webkit-order: 999;
order: 999; } }
@media (min-width: 1280px) {
.col-lg,
[class^='col-lg-'],
@ -493,7 +468,6 @@ a {
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
padding: 0 4px; }
.col-lg,
.row.cols-lg > * {
-webkit-box-flex: 1;
@ -502,128 +476,102 @@ a {
flex-grow: 1;
-webkit-flex-basis: 0;
flex-basis: 0; }
.col-lg-1,
.row.cols-lg-1 > * {
max-width: 8.33333%;
-webkit-flex-basis: 8.33333%;
flex-basis: 8.33333%; }
.col-lg-2,
.row.cols-lg-2 > * {
max-width: 16.66667%;
-webkit-flex-basis: 16.66667%;
flex-basis: 16.66667%; }
.col-lg-3,
.row.cols-lg-3 > * {
max-width: 25%;
-webkit-flex-basis: 25%;
flex-basis: 25%; }
.col-lg-4,
.row.cols-lg-4 > * {
max-width: 33.33333%;
-webkit-flex-basis: 33.33333%;
flex-basis: 33.33333%; }
.col-lg-5,
.row.cols-lg-5 > * {
max-width: 41.66667%;
-webkit-flex-basis: 41.66667%;
flex-basis: 41.66667%; }
.col-lg-6,
.row.cols-lg-6 > * {
max-width: 50%;
-webkit-flex-basis: 50%;
flex-basis: 50%; }
.col-lg-7,
.row.cols-lg-7 > * {
max-width: 58.33333%;
-webkit-flex-basis: 58.33333%;
flex-basis: 58.33333%; }
.col-lg-8,
.row.cols-lg-8 > * {
max-width: 66.66667%;
-webkit-flex-basis: 66.66667%;
flex-basis: 66.66667%; }
.col-lg-9,
.row.cols-lg-9 > * {
max-width: 75%;
-webkit-flex-basis: 75%;
flex-basis: 75%; }
.col-lg-10,
.row.cols-lg-10 > * {
max-width: 83.33333%;
-webkit-flex-basis: 83.33333%;
flex-basis: 83.33333%; }
.col-lg-11,
.row.cols-lg-11 > * {
max-width: 91.66667%;
-webkit-flex-basis: 91.66667%;
flex-basis: 91.66667%; }
.col-lg-12,
.row.cols-lg-12 > * {
max-width: 100%;
-webkit-flex-basis: 100%;
flex-basis: 100%; }
.col-lg-offset-0 {
margin-left: 0; }
.col-lg-offset-1 {
margin-left: 8.33333%; }
.col-lg-offset-2 {
margin-left: 16.66667%; }
.col-lg-offset-3 {
margin-left: 25%; }
.col-lg-offset-4 {
margin-left: 33.33333%; }
.col-lg-offset-5 {
margin-left: 41.66667%; }
.col-lg-offset-6 {
margin-left: 50%; }
.col-lg-offset-7 {
margin-left: 58.33333%; }
.col-lg-offset-8 {
margin-left: 66.66667%; }
.col-lg-offset-9 {
margin-left: 75%; }
.col-lg-offset-10 {
margin-left: 83.33333%; }
.col-lg-offset-11 {
margin-left: 91.66667%; }
.col-lg-normal {
-webkit-order: initial;
order: initial; }
.col-lg-first {
-webkit-order: -999;
order: -999; }
.col-lg-last {
-webkit-order: 999;
order: 999; } }
/*
Definitions for navigation elements.
/*
Definitions for navigation elements.
*/
header {
display: block;
@ -702,8 +650,8 @@ header.sticky {
footer.sticky {
bottom: 0; }
/*
Definitions for forms and input elements.
/*
Definitions for forms and input elements.
*/
form {
background: #e8deff;
@ -757,6 +705,7 @@ label {
align-items: stretch;
-webkit-flex-direction: column;
flex-direction: column; } }
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {
height: auto; }
@ -784,12 +733,15 @@ input:not([type]), [type="text"], [type="email"], [type="number"], [type="search
input:not([type="button"]):not([type="submit"]):not([type="reset"]):hover, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus, textarea:hover, textarea:focus, select:hover, select:focus {
border-color: #6979c6;
box-shadow: none; }
input:not([type="button"]):not([type="submit"]):not([type="reset"]):disabled, input:not([type="button"]):not([type="submit"]):not([type="reset"])[disabled], textarea:disabled, textarea[disabled], select:disabled, select[disabled] {
cursor: not-allowed;
opacity: 0.8; }
input:not([type="button"]):not([type="submit"]):not([type="reset"]):invalid, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus:invalid, textarea:invalid, textarea:focus:invalid, select:invalid, select:focus:invalid {
border-color: #d2405f;
box-shadow: none; }
input:not([type="button"]):not([type="submit"]):not([type="reset"])[readonly], textarea[readonly], select[readonly] {
background: #eae1ff;
border-color: #a9a2ba; }
@ -915,6 +867,7 @@ input[type="file"] {
.button-group [role="button"] + .button, .button-group [role="button"] + [role="button"] {
border: 0;
border-top: 1px solid #a9a2ba; } }
[type="checkbox"], [type="radio"] {
height: 1px;
width: 1px;
@ -943,14 +896,18 @@ input[type="file"] {
margin-left: -20px; }
.input-group [type="checkbox"] + label:hover:before, .input-group [type="checkbox"] + label:active:before, .input-group [type="checkbox"] + label:focus:before, .input-group [type="radio"] + label:hover:before, .input-group [type="radio"] + label:active:before, .input-group [type="radio"] + label:focus:before {
border-color: #6979c6; }
.input-group [type="checkbox"]:focus + label:before, .input-group [type="radio"]:focus + label:before {
border-color: #6979c6; }
.input-group [type="radio"] + label:before, .input-group [type="radio"] + label:after {
border-radius: 50%; }
.input-group [type="checkbox"][disabled] + label, .input-group [type="radio"][disabled] + label {
cursor: not-allowed; }
.input-group [type="checkbox"][disabled] + label:before, .input-group [type="checkbox"][disabled] + label:after, .input-group [type="radio"][disabled] + label:before, .input-group [type="radio"][disabled] + label:after {
opacity: 0.8; }
.input-group [type="checkbox"]:checked + label:after, .input-group [type="radio"]:checked + label:after {
margin-left: -20px;
position: absolute;
@ -961,8 +918,8 @@ input[type="file"] {
background: #211423;
content: ''; }
/*
Custom elements for forms and input elements.
/*
Custom elements for forms and input elements.
*/
button.primary, [type="button"].primary, [type="submit"].primary,
[type="reset"].primary, .button.primary, [role="button"].primary {
@ -1018,8 +975,8 @@ button.large, [type="button"].large, [type="submit"].large,
padding: 12px 18px;
margin: 10px 8px; }
/*
Definitions for the responsive table component.
/*
Definitions for the responsive table component.
*/
table {
border-collapse: separate;
@ -1081,14 +1038,16 @@ table {
font-weight: 700; }
table:not(.preset) td:last-child {
border-bottom: 0; } }
table.striped tr:nth-of-type(2n) > td {
background: #ece4ff; }
@media (max-width: 767px) {
table.striped:not(.preset) tr:nth-of-type(2n) {
background: #ece4ff; } }
/*
Definitions for cards and containers.
/*
Definitions for cards and containers.
*/
.card {
display: -webkit-box;
@ -1129,15 +1088,18 @@ table.striped tr:nth-of-type(2n) > td {
@media (min-width: 320px) {
.card {
max-width: 320px; } }
/*
Custom elements for cards and containers.
/*
Custom elements for cards and containers.
*/
@media (min-width: 480px) {
.card.large {
max-width: 480px; } }
@media (min-width: 240px) {
.card.small {
max-width: 240px; } }
.card.fluid {
max-width: 100%;
width: auto; }
@ -1160,8 +1122,8 @@ table.striped tr:nth-of-type(2n) > td {
.card > .section.double-padded {
padding: 12px 14px; }
/*
Definitions for tabs/horizontal accordions.
/*
Definitions for tabs/horizontal accordions.
*/
.tabs {
width: 100%;
@ -1215,8 +1177,8 @@ table.striped tr:nth-of-type(2n) > td {
transform: scaleY(0);
-webkit-transform-origin: top;
transform-origin: top;
-webkit-transition: -webkit-transform 0.3s ease 0s, transform 0.3s ease 0s;
transition: -webkit-transform 0.3s ease 0s, transform 0.3s ease 0s;
-webkit-transition: -webkit-transform 0.3s ease 0s, transform 0.3s ease 0s;
transition: -webkit-transform 0.3s ease 0s, transform 0.3s ease 0s;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px; }
.tabs > [type="radio"] + label + div + [type="radio"] + label, .tabs.stacked > [type="checkbox"] + label + div + [type="radio"] + label {
@ -1302,8 +1264,9 @@ table.striped tr:nth-of-type(2n) > td {
.tabs > [type="radio"] + label + div:last-of-type {
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px; } }
/*
Definitions for contextual background elements and alerts.
/*
Definitions for contextual background elements and alerts.
*/
mark {
background: #6979c6;
@ -1375,8 +1338,9 @@ mark {
.tooltip:before {
left: -webkit-calc(50% - 8px);
left: calc(50% - 8px); } }
/*
Custom contextual background elements and alerts.
/*
Custom contextual background elements and alerts.
*/
mark.secondary {
background: #d2405f; }
@ -1406,8 +1370,8 @@ mark.inline-block {
.alert.critical {
border: 1px solid #86293d; }
/*
Definitions for progress elements and spinners.
/*
Definitions for progress elements and spinners.
*/
progress {
display: block;
@ -1443,16 +1407,19 @@ progress {
width: -webkit-calc(100% - 2*10px);
width: calc(100% - 2*10px);
margin: 2px 10px; } }
@-webkit-keyframes spinner-donut-anim {
0% {
-webkit-transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg); } }
@keyframes spinner-donut-anim {
0% {
transform: rotate(0deg); }
100% {
transform: rotate(360deg); } }
.spinner-donut {
display: inline-block;
border: 4px solid #d6daef;
@ -1463,8 +1430,8 @@ progress {
-webkit-animation: spinner-donut-anim 1.2s linear infinite;
animation: spinner-donut-anim 1.2s linear infinite; }
/*
Custom elements for progress elements and spinners.
/*
Custom elements for progress elements and spinners.
*/
progress.inline {
display: inline-block;
@ -1514,8 +1481,8 @@ progress.nano {
width: 32px;
height: 32px; }
/*
Definitions for utilities and helper classes.
/*
Definitions for utilities and helper classes.
*/
.hidden {
display: none !important; }
@ -1609,8 +1576,8 @@ ul.breadcrumbs {
-webkit-transform: rotateZ(-45deg);
transform: rotateZ(-45deg); }
/*
Custom elements for utilities and helper classes.
/*
Custom elements for utilities and helper classes.
*/
.bordered {
border: 1px solid rgba(0, 0, 0, 0.25) !important; }
@ -1627,18 +1594,22 @@ ul.breadcrumbs {
@media (min-width: 768px) {
.responsive-margin {
margin: 6px !important; } }
@media (min-width: 1280px) {
.responsive-margin {
margin: 10px !important; } }
.responsive-padding {
padding: 2px 3px !important; }
@media (min-width: 768px) {
.responsive-padding {
padding: 4px 6px !important; } }
@media (min-width: 1280px) {
.responsive-padding {
padding: 8px 10px !important; } }
.shadow-none {
box-shadow: none !important; }

File diff suppressed because one or more lines are too long

View file

@ -1,312 +1,312 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Card</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, card ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto;} [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-12.col-md-normal {box-sizing: border-box;border-bottom: 1px solid #bdbdbd;}
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-12.col-md-normal {border: 0;border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5;}header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Card</h1>
<p>The <strong>card</strong> module provides you with modern, responsive, general-purpose containers for your page's contents. They are very easy to use and their structure is really simple and versatile. Layouts will respond to smaller screens, realigning the cards in a manner that makes your page mobile-friendly.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Card</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>The main content of a website or web app needs to be easy to access and well organized no matter the nature of the content itself. The <strong>card</strong> module seeks to help deal with this problem, by utilizing the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox Layout</a> in order to provide general-purpose containers that help you present the information you want in the best possible way. Cards are designed in a very modern way, self-aligning and structuring their content based on your needs, while also being fully responsive to changes and compatible with the versatile <a href="grid.html"><strong>grid</strong></a> module to deliver the best experience on any device.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>card</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. Remember that the <strong>card</strong> module is heavily dependent on the <a href="grid.html"><strong>grid</strong></a> module, so you might want to first familiarize with its basic layout. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"> <h2>Basic syntax</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container">
<br>
<div class="row">
<div class="card"><div class="section"><h3>Card 1</h3><p>This is a basic card with some sample content.</p></div></div>
<div class="card"><div class="section"><h3>Card 2</h3><p>This is another card with some sample content.</p></div></div>
<div class="card"><div class="section"><h3>Card 3</h3><p>This is one more card with some sample content.</p></div></div>
</div>
<br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p>To start using cards in your layout, you need to be somewhat familiar with the <a href="grid.html"><strong>grid</strong></a> module, so if you aren't, take a minute to read how its basic layout works. The basic syntax for cards is composed of three components, presented below in the order they should be added to the DOM tree:</p>
<ol>
<li>At the outermost level of the card layout syntax is a <code>.row</code>, which serves as a wrapper for all the cards inside it.</li>
<li>Inside the <code>.row</code>, cards are defined as <code>&lt;div&gt;</code> elements of the <code>.card</code> class.</li>
<li>Finally, inside the <code>.card</code>s, you can define sections using the <code>.section</code> class to wrap your content.</li>
</ol>
<p>Note that cards will respond to screen changes, realigning themselves as necessary to fit on the page.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3&gt;Card Title&lt;/h3&gt;
&lt;p&gt;Card content...&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3&gt;Card Title&lt;/h3&gt;
&lt;p&gt;Card content...&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The <strong>card</strong> module is compatible with modern browsers, but might not display properly in older browsers.</li>
<li>If you want to further customize your <code>.section</code>s, check the section below.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-4">
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3&gt;Card Title&lt;/h3&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Card content...&lt;/p&gt;
&lt;p&gt;More card content...&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can add as many <code>.section</code>s as you like to a card.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3&gt;Card Title&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;Content not in a section!&lt;/p&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using cards with content inside them that is not wrapped in sections. Try to use a single <code>.section</code> to wrap the content inside these to avoid unexpected behavior.</p>
</div>
<div class="col-sm-12 col-md-6 col-lg-4">
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;h3 class=&quot;section&quot;&gt;Card Title&lt;/h3&gt;
&lt;p class=&quot;section&quot;&gt;Card content...&lt;/p&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use the <code>.section</code> class for things other than <code>&lt;div&gt;</code> elements (e.g. <code>&lt;h1&gt;</code>-<code>&lt;h6&gt;</code>, <code>&lt;p&gt;</code>, <code>&lt;button&gt;</code>).</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;If you want to place multiple cards side by side, add them all inside the same <code>.row</code>. Placing cards inside different rows or not inside rows at all can result in unexpected behavior. </p>
</div>
<div class="col-sm-12 col-md-6 col-lg-4">
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section row&quot;&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can place <code>.row</code> elements inside <code>.card</code> elements, if you want. you should normally also make those rows into card <code>.section</code>s, but for this specific case you might want to make an exception sometimes.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;card row&quot;&gt;
&lt;/div&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;div class=&quot;card col-sm&quot;&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;You should not have elements that are both cards and rows or columns at the same time.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Sections &amp; media</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container"><br>
<div class="row">
<div class="card"><div class="section"><h3>Card with image</h3></div><img class="section media" src="http://placehold.it/800x600"><div class="section"><p>Content</p></div></div>
<div class="card"><iframe class="section media" width="1280" height="720" src="https://www.youtube.com/embed/ScMzIvxBSi4" frameborder="0"></iframe><div class="section"><h3>Card with video</h3></div></div>
<div class="card"><div class="section"><h3>Normal section</h3></div><div class="section double-padded"><h3>Double-padded section</h3></div></div>
<div class="card"><div class="section"><h3>Normal section</h3></div><div class="section dark"><h3>Dark section</h3></div><div class="section darker"><h3>Darker section</h3></div></div>
<div class="card inverse"><div class="section"><h3>Inverse card</h3></div><img class="section media" src="http://placehold.it/800x600"><div class="section"><p>Content</p></div><div class="section"><p>More content</p></div></div>
</div><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p>You can do a lot more with card sections apart from filling them with textual content. First off, you can add media sections to your cards, applying the styles of <code>.section</code> and <code>.media</code> to an <code>&lt;img&gt;</code> element or a video element of your choice (e.g. using a <code>&lt;iframe&gt;</code> element in the same manner). If you want a section to have more space around it, use the <code>.double-padded</code> class. There are also two section color variations: <code>.dark</code> and <code>.darker</code>. Finally, you can turn a whole <code>.card</code> black, by applying the <code>.inverse</code> class to it. This is not really a section trick, but we thought we should include it here anyway.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;img src=&quot;...&quot; class=&quot;section media&quot;&gt;
&lt;div class=&quot;section double-padded&quot;&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/div&gt;
&lt;div class=&quot;section dark&quot;&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/div&gt;
&lt;div class=&quot;section darker&quot;&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;card inverse&quot;&gt;
&lt;div class=&quot;section&quot;&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The <code>.media</code> class might not be well supported in older browsers, especially legacy versions of Internet Explorer.</li>
<li>Due to the <code>.media</code> class using <a href="http://caniuse.com/#feat=object-fit"><code>object-fit</code></a>, you might want to use a polyfill for better browser support, especially if you are targeting Microsoft browsers. We recommend <a href="https://github.com/bfred-it/object-fit-images">this one</a> for images and <a href="https://github.com/jonathantneal/fitie">this one</a> for videos.</li>
<li>Depending on the source website, some embedded videos might not display properly inside a <code>.media</code> section.</li>
<li>The <code>.media</code> class has a preset size of <code>height: 200px</code>. If you want to customize this, you should check the <a href="customization.html">customization page</a> for instructions.</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Card sizing &amp; fluidity</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container"><br>
<div class="row">
<div class="card small"><div class="section"><h3>Small Card</h3><p>Small cards are <code>240px</code> wide.</p></div></div>
<div class="card large"><div class="section"><h3>Large Card</h3><p>Large cards are <code>480px</code> wide.</p></div></div>
<div class="col-sm-12 col-md-12 col-lg">
<div class="card fluid" style="margin: 2px 10px 20px;"><div class="section"><h3>Fluid Card</h3><p>Fluid cards scale their width based on their container. Always wrap them in a column.</p></div></div>
</div>
</div>
<br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p>Apart from the normal-sized cards (<code>320px</code> wide), there are also two different fixed-width card styles, which can be applied using the <code>.small</code> and <code>.large</code> classes respectively. Fluid cards are available via the <code>.fluid</code> class, but they require one extra step in the card structure, between the <code>.row</code> and <code>.card</code> step, which is to insert either a <code>.col-<span class="fore-primary">SCR_SZ</span></code>, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens) or a <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> to specify columns with fixed width, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the column.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;card small&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;card large&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;col-sm-12&quot;&gt;
&lt;div class=&quot;card fluid&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li><code>.fluid</code> cards might not display properly in older browsers, especially legacy versions of Internet Explorer.</li>
<li>Due to the fact that <code>.fluid</code> cards stretch to fill their parent container, they might not fully respect their margins, like the rest of the cards. However, this should not cause any noticable problems with layout, except maybe the odd pixel here and there.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;card fluid&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid mixing fixed-width cards with <code>.fluid</code> cards. Mixing the two could result in some unexpected behaviors. You can, however, mix fixed-width cards with fluid columns, which can contain <code>.fluid</code> cards inside them, effectively achieving the desired effect.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;card fluid&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using <code>.fluid</code> cards without wrapping them in columns. Try to use a single <code>.col-sm</code> to wrap the card inside it, otherwise there might be unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Card</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, card ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto;} [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-12.col-md-normal {box-sizing: border-box;border-bottom: 1px solid #bdbdbd;}
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-12.col-md-normal {border: 0;border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5;}header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Card</h1>
<p>The <strong>card</strong> module provides you with modern, responsive, general-purpose containers for your page's contents. They are very easy to use and their structure is really simple and versatile. Layouts will respond to smaller screens, realigning the cards in a manner that makes your page mobile-friendly.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Card</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>The main content of a website or web app needs to be easy to access and well organized no matter the nature of the content itself. The <strong>card</strong> module seeks to help deal with this problem, by utilizing the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox Layout</a> in order to provide general-purpose containers that help you present the information you want in the best possible way. Cards are designed in a very modern way, self-aligning and structuring their content based on your needs, while also being fully responsive to changes and compatible with the versatile <a href="grid.html"><strong>grid</strong></a> module to deliver the best experience on any device.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>card</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. Remember that the <strong>card</strong> module is heavily dependent on the <a href="grid.html"><strong>grid</strong></a> module, so you might want to first familiarize with its basic layout. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"> <h2>Basic syntax</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container">
<br>
<div class="row">
<div class="card"><div class="section"><h3>Card 1</h3><p>This is a basic card with some sample content.</p></div></div>
<div class="card"><div class="section"><h3>Card 2</h3><p>This is another card with some sample content.</p></div></div>
<div class="card"><div class="section"><h3>Card 3</h3><p>This is one more card with some sample content.</p></div></div>
</div>
<br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p>To start using cards in your layout, you need to be somewhat familiar with the <a href="grid.html"><strong>grid</strong></a> module, so if you aren't, take a minute to read how its basic layout works. The basic syntax for cards is composed of three components, presented below in the order they should be added to the DOM tree:</p>
<ol>
<li>At the outermost level of the card layout syntax is a <code>.row</code>, which serves as a wrapper for all the cards inside it.</li>
<li>Inside the <code>.row</code>, cards are defined as <code>&lt;div&gt;</code> elements of the <code>.card</code> class.</li>
<li>Finally, inside the <code>.card</code>s, you can define sections using the <code>.section</code> class to wrap your content.</li>
</ol>
<p>Note that cards will respond to screen changes, realigning themselves as necessary to fit on the page.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3&gt;Card Title&lt;/h3&gt;
&lt;p&gt;Card content...&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3&gt;Card Title&lt;/h3&gt;
&lt;p&gt;Card content...&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The <strong>card</strong> module is compatible with modern browsers, but might not display properly in older browsers.</li>
<li>If you want to further customize your <code>.section</code>s, check the section below.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-4">
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3&gt;Card Title&lt;/h3&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Card content...&lt;/p&gt;
&lt;p&gt;More card content...&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can add as many <code>.section</code>s as you like to a card.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;h3&gt;Card Title&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;Content not in a section!&lt;/p&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using cards with content inside them that is not wrapped in sections. Try to use a single <code>.section</code> to wrap the content inside these to avoid unexpected behavior.</p>
</div>
<div class="col-sm-12 col-md-6 col-lg-4">
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;h3 class=&quot;section&quot;&gt;Card Title&lt;/h3&gt;
&lt;p class=&quot;section&quot;&gt;Card content...&lt;/p&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use the <code>.section</code> class for things other than <code>&lt;div&gt;</code> elements (e.g. <code>&lt;h1&gt;</code>-<code>&lt;h6&gt;</code>, <code>&lt;p&gt;</code>, <code>&lt;button&gt;</code>).</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;If you want to place multiple cards side by side, add them all inside the same <code>.row</code>. Placing cards inside different rows or not inside rows at all can result in unexpected behavior. </p>
</div>
<div class="col-sm-12 col-md-6 col-lg-4">
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section row&quot;&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;card&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can place <code>.row</code> elements inside <code>.card</code> elements, if you want. you should normally also make those rows into card <code>.section</code>s, but for this specific case you might want to make an exception sometimes.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;card row&quot;&gt;
&lt;/div&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;div class=&quot;card col-sm&quot;&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;You should not have elements that are both cards and rows or columns at the same time.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Sections &amp; media</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container"><br>
<div class="row">
<div class="card"><div class="section"><h3>Card with image</h3></div><img class="section media" src="http://placehold.it/800x600"><div class="section"><p>Content</p></div></div>
<div class="card"><iframe class="section media" width="1280" height="720" src="https://www.youtube.com/embed/ScMzIvxBSi4" frameborder="0"></iframe><div class="section"><h3>Card with video</h3></div></div>
<div class="card"><div class="section"><h3>Normal section</h3></div><div class="section double-padded"><h3>Double-padded section</h3></div></div>
<div class="card"><div class="section"><h3>Normal section</h3></div><div class="section dark"><h3>Dark section</h3></div><div class="section darker"><h3>Darker section</h3></div></div>
<div class="card inverse"><div class="section"><h3>Inverse card</h3></div><img class="section media" src="http://placehold.it/800x600"><div class="section"><p>Content</p></div><div class="section"><p>More content</p></div></div>
</div><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p>You can do a lot more with card sections apart from filling them with textual content. First off, you can add media sections to your cards, applying the styles of <code>.section</code> and <code>.media</code> to an <code>&lt;img&gt;</code> element or a video element of your choice (e.g. using a <code>&lt;iframe&gt;</code> element in the same manner). If you want a section to have more space around it, use the <code>.double-padded</code> class. There are also two section color variations: <code>.dark</code> and <code>.darker</code>. Finally, you can turn a whole <code>.card</code> black, by applying the <code>.inverse</code> class to it. This is not really a section trick, but we thought we should include it here anyway.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;img src=&quot;...&quot; class=&quot;section media&quot;&gt;
&lt;div class=&quot;section double-padded&quot;&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/div&gt;
&lt;div class=&quot;section dark&quot;&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/div&gt;
&lt;div class=&quot;section darker&quot;&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;card inverse&quot;&gt;
&lt;div class=&quot;section&quot;&gt;&lt;p&gt;Content&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The <code>.media</code> class might not be well supported in older browsers, especially legacy versions of Internet Explorer.</li>
<li>Due to the <code>.media</code> class using <a href="http://caniuse.com/#feat=object-fit"><code>object-fit</code></a>, you might want to use a polyfill for better browser support, especially if you are targeting Microsoft browsers. We recommend <a href="https://github.com/bfred-it/object-fit-images">this one</a> for images and <a href="https://github.com/jonathantneal/fitie">this one</a> for videos.</li>
<li>Depending on the source website, some embedded videos might not display properly inside a <code>.media</code> section.</li>
<li>The <code>.media</code> class has a preset size of <code>height: 200px</code>. If you want to customize this, you should check the <a href="customization.html">customization page</a> for instructions.</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Card sizing &amp; fluidity</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-12 col-md-normal">
<div class="container"><br>
<div class="row">
<div class="card small"><div class="section"><h3>Small Card</h3><p>Small cards are <code>240px</code> wide.</p></div></div>
<div class="card large"><div class="section"><h3>Large Card</h3><p>Large cards are <code>480px</code> wide.</p></div></div>
<div class="col-sm-12 col-md-12 col-lg">
<div class="card fluid" style="margin: 2px 10px 20px;"><div class="section"><h3>Fluid Card</h3><p>Fluid cards scale their width based on their container. Always wrap them in a column.</p></div></div>
</div>
</div>
<br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-12 col-md-normal">
<p>Apart from the normal-sized cards (<code>320px</code> wide), there are also two different fixed-width card styles, which can be applied using the <code>.small</code> and <code>.large</code> classes respectively. Fluid cards are available via the <code>.fluid</code> class, but they require one extra step in the card structure, between the <code>.row</code> and <code>.card</code> step, which is to insert either a <code>.col-<span class="fore-primary">SCR_SZ</span></code>, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens) or a <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> to specify columns with fixed width, replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the column.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;card small&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;card large&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;col-sm-12&quot;&gt;
&lt;div class=&quot;card fluid&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li><code>.fluid</code> cards might not display properly in older browsers, especially legacy versions of Internet Explorer.</li>
<li>Due to the fact that <code>.fluid</code> cards stretch to fill their parent container, they might not fully respect their margins, like the rest of the cards. However, this should not cause any noticable problems with layout, except maybe the odd pixel here and there.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;div class=&quot;card&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;card fluid&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid mixing fixed-width cards with <code>.fluid</code> cards. Mixing the two could result in some unexpected behaviors. You can, however, mix fixed-width cards with fluid columns, which can contain <code>.fluid</code> cards inside them, effectively achieving the desired effect.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;card fluid&quot;&gt;
&lt;div class=&quot;section&quot;&gt;
&lt;p&gt;Content&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using <code>.fluid</code> cards without wrapping them in columns. Try to use a single <code>.col-sm</code> to wrap the card inside it, otherwise there might be unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

View file

@ -1,252 +1,252 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Contextual</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, contextual ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #bdbdbd; }
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Contextual</h1>
<p>The <strong>contextual</strong> module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. The contextual alerts aim to replace the commonly used modal dialog design paradigm with a more modern one. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Contextual</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Almost every piece of content present on the web has some sort of content that needs highlighting in one way or another. The <strong>contextual</strong> module provides you with simple semantic text highlighting that utilises the <code>&lt;mark&gt;</code> HTML element. Apart from that, this module contains styles and definitions for a simple <code>.alert</code> container, that you can use to show alerts on your websites and web apps. Alerts replace the traditional design paradigms of modals, messages and alerts by defining a simple, usable container that is also mobile friendly. Finally, a simple accessible <code>.tooltip</code> implementation is included. All components in this module are fully accessible, so that's another thing not to worry about.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>contextual</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Text highlighting</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<p>This is some text with a <mark>highlight</mark>.</p>
<p>Apart from the primary highlight style, there are also <mark class="secondary">secondary</mark> and <mark class="tertiary">tertiary</mark> styles for highlighting.</p><br>
<p><mark class="inline-block">If you want to highlight a longer piece of text, without line breaks, you can turn the highlight into an inline-block like you see this piece of text being displayed.</mark></p><br>
<p>Finally, you can create contextual tags like <mark class="tag">this</mark> or <mark class="tag">7</mark>.</p><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>To add simple highlights in your text, you can use the <code>&lt;mark&gt;</code> HTML element. These highlights come pre-styled to use the default primary color, but if you would rather use another color for your highlight you can easily add the <code>.secondary</code> or <code>.tertiary</code> class to a <code>&lt;mark&gt;</code> element. For longer pieces of text that need highlighting, consider adding the <code>.inline-block</code> class to make them stand out even more. Finally, you can create contextual tags, using the <code>.tag</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;mark&gt;primary&lt;/mark&gt;
&lt;mark class=&quot;secondary&quot;&gt;secondary&lt;/mark&gt;
&lt;mark class=&quot;tertiary&quot;&gt;tertiary&lt;/mark&gt;
&lt;mark class=&quot;inline-block&quot;&gt;long highlight text...&lt;/mark&gt;
&lt;mark class=&quot;tag&quot;&gt;tag&lt;/mark&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Try to use elements with the <code>.inline-block</code> class only when absolutely necessary, as they break the normal text flow of the document. Avoid using this class on shorter pieces of text that span a few words and contain no line breaks.</li>
<li><code>&lt;mark&gt;</code> elements, along with their supporting classes (except for <code>.inline-block</code>) can be easily used in paragraphs, headings and other elements, as they scale according to their parent element.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;mark class=&quot;tag tertiary&quot;&gt;green tag&lt;/mark&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;mark class=&quot;inline-block secondary&quot;&gt;red chunk&lt;/mark&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can combine any of the contextual color classes (<code>.secondary</code> or <code>.tertiary</code>) with the <code>.tag</code> or <code>.inline-block</code> class.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;mark class=&quot;secondary tertiary&quot;&gt;no, no&lt;/mark&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;mark class=&quot;inline-block tag&quot;&gt;oh, no&lt;/mark&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid combining two contextual color classes or a <code>.tag</code> and an <code>.inline-block</code>, as these combinations might result in unexpected behavior.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;mark class=&quot;inline-block&quot;&gt;some
&lt;mark class=&quot;secondary&quot;&gt;text&lt;/mark&gt;
&lt;/mark&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can only nest a <code>&lt;mark&gt;</code> inside another if the outer one is of the <code>.inline-block</code> class. You can color the inner <code>&lt;mark&gt;</code> using any of the contextual color classes or even make it a <code>.tag</code>. Be careful, however, to not make the inner <code>&lt;mark&gt;</code> an <code>.inline-block</code> as well.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;mark&gt;some
&lt;mark class=&quot;secondary&quot;&gt;text&lt;/mark&gt;
&lt;/mark&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using nested <code>&lt;mark&gt;</code> elements, unless the outer <code>&lt;mark&gt;</code> element is an <code>.inline-block</code>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Alerts</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<div class="alert" style="margin-top: 8px; margin-bottom: 8px;"><h3>This is an alert</h3><p>Make sure you read this!</p></div>
<div class="alert urgent" style="margin-bottom: 8px;"><h3>This is an urgent alert</h3><p>Make absolutely sure you read this!</p></div>
<div class="alert critical" style="margin-bottom: 8px;"><h3>This is a critical alert</h3><p>Make certain you read and actually understand this!</p></div>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Alerts replace modal dialogs, along with messages, notifications and traditional alerts with a simpler, easier design paradigm. To create an alert, use a <code>&lt;div&gt;</code> element, which will contain one or more elements (for example a <code>&lt;h3&gt;</code> and a <code>&lt;p&gt;</code>) and add the <code>.alert</code> class to it. For more urgent alerts, use the <code>.urgent</code> class and for critical alerts, use the <code>.critical</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;alert&quot;&gt;
&lt;h3&gt;This is an alert&lt;/h3&gt;
&lt;p&gt;Make sure you read this!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert urgent&quot;&gt;
&lt;h3&gt;This is an urgent alert&lt;/h3&gt;
&lt;p&gt;Make absolutely sure you read this!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert critical&quot;&gt;
&lt;h3&gt;This is a critical alert&lt;/h3&gt;
&lt;p&gt;Make certain you read and actually understand this!&lt;/p&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Alert elements do not have any pre-defined behavior. You should use your own Javascript code and interactive HTML elements to deal with showing and hiding them as necessary.</li>
<li>If you want to make your alerts more accessible, we suggest you add either the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_alert_role">alert</a>&quot;</span></code> attribute or the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_alertdialog_role">alertdialog</a>&quot;</span></code> attribute, depending on the behavior you are planning to implement for your alerts.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;p class=&quot;alert&quot;&gt;Short and to the point&lt;/p&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;h2 class=&quot;alert urgent&quot;&gt;Large and to the point&lt;/h2&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;Instead of using a <code>&lt;div&gt;</code> element, you can also apply the <code>.alert</code> class to common textual elements, such as paragraphs or headings.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;button class=&quot;alert&quot;&gt;Not a good alert&lt;/button&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid applying the <code>.alert</code> class to non-textual HTML elements, such as buttons or images. Doing so might result in unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Animated alerts</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<div class="animated alert" style="margin-top: 8px; margin-bottom: 8px;"><h3>This is an alert</h3><p>Make sure you read this!</p></div>
<div class="animated alert urgent" style="margin-bottom: 8px;"><h3>This is an urgent alert</h3><p>Make absolutely sure you read this!</p></div>
<div class="animated alert critical" style="margin-bottom: 8px;"><h3>This is a critical alert</h3><p>Make certain you read and actually understand this!</p></div>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Alerts can be animated, so that they pop out a little more to make sure your users can see them. To animate an alert box, use the <code>.animated</code> class on an existing <code>.alert</code> and it shall periodically scale up a little bit to make users notice it.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;alert animated&quot;&gt;
&lt;h3&gt;Animated alert&lt;/h3&gt;
&lt;/div&gt;
&lt;div class=&quot;alert urgent animated&quot;&gt;
&lt;h3&gt;Animated urgent alert&lt;/h3&gt;
&lt;/div&gt;
&lt;div class=&quot;alert critical animated&quot;&gt;
&lt;h3&gt;Animated critical alert&lt;/h3&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Animated alerts may not display properly on older browsers, especially legacy versions of Internet Explorer.</li>
<li>It has been reported that some Webkit-based browsers, such as Chrome, display animated alerts in a very blurry fashion. Despite our best attempts at solving these problems, they seem to be quite persistent and we do not yet know how to fix them. Thus, you might want to hold off on using animated alerts if you think this might be an issue or try to control them using Javascript code to make the animation stop after a short amount of time (i.e. removing the <code>.animated</code> class).</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Tooltips</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<br /><p class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</p><br />
<p class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</p><br />
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Tooltips can be used to convey context-sensitive information when the user hovers over some text. To create a tooltip, simply wrap the text you want users to hover over in an element with the <code>.tooltip</code> class (our choice is usually a <code>&lt;span&gt;</code> element, but your needs may differ) and add an <code><span class="fore-secondary">aria-label</span></code> in that element, setting its value to the content of your tooltip. Tooltips display at the top of the hovered text by default, so if you want to show them below the text, add the <code>.bottom</code> class to them.</p>
<h3>Sample code</h3>
<pre>&lt;span class=&quot;tooltip&quot; aria-label=&quot;This is a tooltip&quot;&gt;Hover over this text to see a tooltip!&lt;/span&gt;
&lt;span class=&quot;tooltip bottom&quot; aria-label=&quot;This is a tooltip&quot;&gt;Hover over this text to see a reverse tooltip!&lt;/span&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Tooltips are built to be accessible and should display properly on screenreaders.</li>
<li>If you are not satisfied with the default tooltip colors, please check out the <a href="customization.html">customization page</a> for instuctions on how to create your own tooltip variants.</li>
<li>Rembmer to always add the <code><span class="fore-secondary">aria-label</span></code> attribute, otherwise your tooltip will not have any text to show.</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Contextual</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, contextual ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #bdbdbd; }
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Contextual</h1>
<p>The <strong>contextual</strong> module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. The contextual alerts aim to replace the commonly used modal dialog design paradigm with a more modern one. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Contextual</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Almost every piece of content present on the web has some sort of content that needs highlighting in one way or another. The <strong>contextual</strong> module provides you with simple semantic text highlighting that utilises the <code>&lt;mark&gt;</code> HTML element. Apart from that, this module contains styles and definitions for a simple <code>.alert</code> container, that you can use to show alerts on your websites and web apps. Alerts replace the traditional design paradigms of modals, messages and alerts by defining a simple, usable container that is also mobile friendly. Finally, a simple accessible <code>.tooltip</code> implementation is included. All components in this module are fully accessible, so that's another thing not to worry about.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>contextual</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Text highlighting</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<p>This is some text with a <mark>highlight</mark>.</p>
<p>Apart from the primary highlight style, there are also <mark class="secondary">secondary</mark> and <mark class="tertiary">tertiary</mark> styles for highlighting.</p><br>
<p><mark class="inline-block">If you want to highlight a longer piece of text, without line breaks, you can turn the highlight into an inline-block like you see this piece of text being displayed.</mark></p><br>
<p>Finally, you can create contextual tags like <mark class="tag">this</mark> or <mark class="tag">7</mark>.</p><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>To add simple highlights in your text, you can use the <code>&lt;mark&gt;</code> HTML element. These highlights come pre-styled to use the default primary color, but if you would rather use another color for your highlight you can easily add the <code>.secondary</code> or <code>.tertiary</code> class to a <code>&lt;mark&gt;</code> element. For longer pieces of text that need highlighting, consider adding the <code>.inline-block</code> class to make them stand out even more. Finally, you can create contextual tags, using the <code>.tag</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;mark&gt;primary&lt;/mark&gt;
&lt;mark class=&quot;secondary&quot;&gt;secondary&lt;/mark&gt;
&lt;mark class=&quot;tertiary&quot;&gt;tertiary&lt;/mark&gt;
&lt;mark class=&quot;inline-block&quot;&gt;long highlight text...&lt;/mark&gt;
&lt;mark class=&quot;tag&quot;&gt;tag&lt;/mark&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Try to use elements with the <code>.inline-block</code> class only when absolutely necessary, as they break the normal text flow of the document. Avoid using this class on shorter pieces of text that span a few words and contain no line breaks.</li>
<li><code>&lt;mark&gt;</code> elements, along with their supporting classes (except for <code>.inline-block</code>) can be easily used in paragraphs, headings and other elements, as they scale according to their parent element.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;mark class=&quot;tag tertiary&quot;&gt;green tag&lt;/mark&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;mark class=&quot;inline-block secondary&quot;&gt;red chunk&lt;/mark&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can combine any of the contextual color classes (<code>.secondary</code> or <code>.tertiary</code>) with the <code>.tag</code> or <code>.inline-block</code> class.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;mark class=&quot;secondary tertiary&quot;&gt;no, no&lt;/mark&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;mark class=&quot;inline-block tag&quot;&gt;oh, no&lt;/mark&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid combining two contextual color classes or a <code>.tag</code> and an <code>.inline-block</code>, as these combinations might result in unexpected behavior.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;mark class=&quot;inline-block&quot;&gt;some
&lt;mark class=&quot;secondary&quot;&gt;text&lt;/mark&gt;
&lt;/mark&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can only nest a <code>&lt;mark&gt;</code> inside another if the outer one is of the <code>.inline-block</code> class. You can color the inner <code>&lt;mark&gt;</code> using any of the contextual color classes or even make it a <code>.tag</code>. Be careful, however, to not make the inner <code>&lt;mark&gt;</code> an <code>.inline-block</code> as well.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;mark&gt;some
&lt;mark class=&quot;secondary&quot;&gt;text&lt;/mark&gt;
&lt;/mark&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using nested <code>&lt;mark&gt;</code> elements, unless the outer <code>&lt;mark&gt;</code> element is an <code>.inline-block</code>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Alerts</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<div class="alert" style="margin-top: 8px; margin-bottom: 8px;"><h3>This is an alert</h3><p>Make sure you read this!</p></div>
<div class="alert urgent" style="margin-bottom: 8px;"><h3>This is an urgent alert</h3><p>Make absolutely sure you read this!</p></div>
<div class="alert critical" style="margin-bottom: 8px;"><h3>This is a critical alert</h3><p>Make certain you read and actually understand this!</p></div>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Alerts replace modal dialogs, along with messages, notifications and traditional alerts with a simpler, easier design paradigm. To create an alert, use a <code>&lt;div&gt;</code> element, which will contain one or more elements (for example a <code>&lt;h3&gt;</code> and a <code>&lt;p&gt;</code>) and add the <code>.alert</code> class to it. For more urgent alerts, use the <code>.urgent</code> class and for critical alerts, use the <code>.critical</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;alert&quot;&gt;
&lt;h3&gt;This is an alert&lt;/h3&gt;
&lt;p&gt;Make sure you read this!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert urgent&quot;&gt;
&lt;h3&gt;This is an urgent alert&lt;/h3&gt;
&lt;p&gt;Make absolutely sure you read this!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert critical&quot;&gt;
&lt;h3&gt;This is a critical alert&lt;/h3&gt;
&lt;p&gt;Make certain you read and actually understand this!&lt;/p&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Alert elements do not have any pre-defined behavior. You should use your own Javascript code and interactive HTML elements to deal with showing and hiding them as necessary.</li>
<li>If you want to make your alerts more accessible, we suggest you add either the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_alert_role">alert</a>&quot;</span></code> attribute or the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_alertdialog_role">alertdialog</a>&quot;</span></code> attribute, depending on the behavior you are planning to implement for your alerts.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;p class=&quot;alert&quot;&gt;Short and to the point&lt;/p&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;h2 class=&quot;alert urgent&quot;&gt;Large and to the point&lt;/h2&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;Instead of using a <code>&lt;div&gt;</code> element, you can also apply the <code>.alert</code> class to common textual elements, such as paragraphs or headings.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;button class=&quot;alert&quot;&gt;Not a good alert&lt;/button&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid applying the <code>.alert</code> class to non-textual HTML elements, such as buttons or images. Doing so might result in unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Animated alerts</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<div class="animated alert" style="margin-top: 8px; margin-bottom: 8px;"><h3>This is an alert</h3><p>Make sure you read this!</p></div>
<div class="animated alert urgent" style="margin-bottom: 8px;"><h3>This is an urgent alert</h3><p>Make absolutely sure you read this!</p></div>
<div class="animated alert critical" style="margin-bottom: 8px;"><h3>This is a critical alert</h3><p>Make certain you read and actually understand this!</p></div>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Alerts can be animated, so that they pop out a little more to make sure your users can see them. To animate an alert box, use the <code>.animated</code> class on an existing <code>.alert</code> and it shall periodically scale up a little bit to make users notice it.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;alert animated&quot;&gt;
&lt;h3&gt;Animated alert&lt;/h3&gt;
&lt;/div&gt;
&lt;div class=&quot;alert urgent animated&quot;&gt;
&lt;h3&gt;Animated urgent alert&lt;/h3&gt;
&lt;/div&gt;
&lt;div class=&quot;alert critical animated&quot;&gt;
&lt;h3&gt;Animated critical alert&lt;/h3&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Animated alerts may not display properly on older browsers, especially legacy versions of Internet Explorer.</li>
<li>It has been reported that some Webkit-based browsers, such as Chrome, display animated alerts in a very blurry fashion. Despite our best attempts at solving these problems, they seem to be quite persistent and we do not yet know how to fix them. Thus, you might want to hold off on using animated alerts if you think this might be an issue or try to control them using Javascript code to make the animation stop after a short amount of time (i.e. removing the <code>.animated</code> class).</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Tooltips</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<br /><p class="tooltip" aria-label="This is a tooltip">Hover over this text to see a tooltip!</p><br />
<p class="tooltip bottom" aria-label="This is a tooltip">Hover over this text to see a reverse tooltip!</p><br />
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Tooltips can be used to convey context-sensitive information when the user hovers over some text. To create a tooltip, simply wrap the text you want users to hover over in an element with the <code>.tooltip</code> class (our choice is usually a <code>&lt;span&gt;</code> element, but your needs may differ) and add an <code><span class="fore-secondary">aria-label</span></code> in that element, setting its value to the content of your tooltip. Tooltips display at the top of the hovered text by default, so if you want to show them below the text, add the <code>.bottom</code> class to them.</p>
<h3>Sample code</h3>
<pre>&lt;span class=&quot;tooltip&quot; aria-label=&quot;This is a tooltip&quot;&gt;Hover over this text to see a tooltip!&lt;/span&gt;
&lt;span class=&quot;tooltip bottom&quot; aria-label=&quot;This is a tooltip&quot;&gt;Hover over this text to see a reverse tooltip!&lt;/span&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Tooltips are built to be accessible and should display properly on screenreaders.</li>
<li>If you are not satisfied with the default tooltip colors, please check out the <a href="customization.html">customization page</a> for instuctions on how to create your own tooltip variants.</li>
<li>Rembmer to always add the <code><span class="fore-secondary">aria-label</span></code> attribute, otherwise your tooltip will not have any text to show.</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

View file

@ -1,211 +1,211 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Core</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, core ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
.box-centered { text-align: center; } .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto;} [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #bdbdbd; }
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd; } }
header.sticky a.button { padding: 4px 6px; font-size: 0.95em; }
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<h1>Core</h1>
<p>The <strong>core</strong> module contains basic reset and fix rules, based on <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Core</li></ul><br />
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Before applying any typography and styling rules, some resets need to be applied to make sure that different elements display consistently on all browsers. The <strong>core</strong> module utilizes the ruleset of <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0 to apply those much needed resets and fixes. However, to keep the framework small, we removed some rules that only help with legacy browser support and also tweaked a lot of the rules around to use customizable variables so no duplicate rules are applied, taking up unnecessary space. The typography rules in <strong>core</strong> deal with a page's basics, like fonts and styling of headings and paragraphs, horizontal rules, colors, margins, padding etc.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>core</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Typography</h2></div>
<div class="section row">
<div class="col-sm-12">
<p>For the basic typography rules we did the following, along with other things presented below:</p>
<ul>
<li>We use a <a href="https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/">native font stack</a> to figure out the best font for your device.</li>
<li>We set the colors to <code>background: #f5f5f5;</code> and <code>color: #212121;</code>.</li>
<li>We use a <code>font-size</code> of <code>16px</code> for the root element.</li>
<li>We set <code>line-height</code> to <code>1.5</code>.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Headings</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal row">
<div class="col-sm-12 col-lg-6 col-lg-first"><h1>Heading 1<small>Subheading</small></h1></div>
<div class="col-sm-12 col-lg-6"><h2>Heading 2<small>Subheading</small></h2></div>
<div class="col-sm-12 col-lg-6 col-lg-last"><h3>Heading 3<small>Subheading</small></h3></div>
<div class="col-sm-12 col-lg-6 col-lg-first"><h4>Heading 4<small>Subheading</small></h4></div>
<div class="col-sm-12 col-lg-6"><h5>Heading 5<small>Subheading</small></h5></div>
<div class="col-sm-12 col-lg-6 col-lg-last"><h6>Heading 6<small>Subheading</small></h6></div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>All six of the HTML headings (<code>&lt;h1&gt;</code> - <code>&lt;h6&gt;</code>) are styled with simple rules, providing a clean base for your pages' headings. Apart from the headings themselves, complementary rules are provided for <code>&lt;small&gt;</code> elements inside headings, allowing you to define subheadings or explanatory text for those headings. These subheadings are stylized to display below the headings in smaller, lighter type.</p>
<h3>Sample code</h3>
<pre>&lt;h1&gt;Heading 1&lt;small&gt;Subheading&lt;/small&gt;&lt;/h1&gt;
&lt;h2&gt;Heading 2&lt;small&gt;Subheading&lt;/small&gt;&lt;/h2&gt;
&lt;h3&gt;Heading 3&lt;small&gt;Subheading&lt;/small&gt;&lt;/h3&gt;
&lt;h4&gt;Heading 4&lt;small&gt;Subheading&lt;/small&gt;&lt;/h4&gt;
&lt;h5&gt;Heading 5&lt;small&gt;Subheading&lt;/small&gt;&lt;/h5&gt;
&lt;h6&gt;Heading 6&lt;small&gt;Subheading&lt;/small&gt;&lt;/h6&gt;</pre><br>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Common textual elements</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><br><p>This is a paragraph with some sample text. Did you know <strong>mini.css</strong> v2.1 is codenamed <strong>Fermion</strong>? No? Well, now you do! Oh, by the way, that was some Bold text and here is some <em>text in Italics</em>. Maybe you want to know what our inline elements look like. For example a <a href="https://github.com/Chalarangelo/mini.css">link to the Github repository of mini.css</a> looks like that! Neat, right? Maybe you want to see some <code>inline code</code> or some sample <kbd>input</kbd>. Oh, also <small>small text</small> is cool, along with its siblings: the subscript<sub>hi!</sub> and the superscript<sup>hello!</sup>. Finally, check out the horizontal rule, preformatted code block and quotation below.</p><hr>
<pre>function sum(num1, num2) {
var num3 = num1 + num2;
console.log('Result: ' + num3);
}</pre>
<blockquote cite="Mr. Quotalot">This is some quoted text from elsewhere.</blockquote><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>The most common HTML5 elements must be things like <code>&lt;p&gt;</code>aragraphs, bold (<code>&lt;strong&gt;</code>) &amp; italics (<code>&lt;em&gt;</code>) text, links (<code>&lt;a&gt;</code>), horizontal rules (<code>&lt;hr&gt;</code>) and <code>&lt;small&gt;</code> text. These, along with a few others, are styled by default using clean, modern design to make your pages look cool and stand out from the rest of the internet.</p>
<h3>Sample code</h3>
<pre>&lt;p&gt;This is a paragraph with some &lt;strong&gt;bold text&lt;/strong&gt; and some &lt;em&gt;italics text&lt;/em&gt;.&lt;/p&gt;
&lt;a href=&quot;#&quot;&gt;This is a link.&lt;/a&gt;
&lt;small&gt;This is some small text.&lt;/small&gt;
&lt;sub&gt;Subscript&lt;/sub&gt;
&lt;sup&gt;Superscript&lt;/sup&gt;
&lt;code&gt;Inline code&lt;/code&gt;
&lt;kbd&gt;Keyboard Input&lt;/kbd&gt;
&lt;hr&gt;
&lt;pre&gt;This is some preformatted text.&lt;/pre&gt;
&lt;blockquote cite=&quot;Quotation source&quot;&gt;
This is some quoted text from another website or person.
&lt;/blockquote&gt;</pre><br>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Lists</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><br>
<ul>
<li>Apple</li>
<li>Orange</li>
<li>Strawberry</li>
</ul><br>
<ol>
<li>Wake up</li>
<li>Eat breakfast</li>
<li>Go to work</li>
</ol><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Lists are also very commonly used in websites and apps. We tweaked a few margins and paddings to save some space and make them align properly with the rest of the common HTML elements that we use, but both unordered lists (<code>&lt;ul&gt;</code>) and ordered lists (<code>&lt;ol&gt;</code>) are minimally pre-styled to make things a little bit easier for you.</p>
<h3>Sample code</h3>
<pre>&lt;ul&gt;
&lt;li&gt;Apple&lt;/li&gt;
&lt;li&gt;Orange&lt;/li&gt;
&lt;li&gt;Strawberry&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;Wake up&lt;/li&gt;
&lt;li&gt;Eat breakfast&lt;/li&gt;
&lt;li&gt;Go to work&lt;/li&gt;
&lt;/ol&gt;</pre><br>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Image responsiveness</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><img src="https://placehold.it/800x600"></div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Image elements (<code>&lt;img&gt;</code>) are responsive by default, without the need for any special classes or anything else. We made sure they will scale down as necessary to display properly on smaller devices, while keeping their original aspect ratio, but they will never scale up above their original size.</p>
<h3>Sample code</h3>
<pre>&lt;img src=&quot;...&quot;&gt;</pre><br>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Core</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, core ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
.box-centered { text-align: center; } .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto;} [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #bdbdbd; }
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd; } }
header.sticky a.button { padding: 4px 6px; font-size: 0.95em; }
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<h1>Core</h1>
<p>The <strong>core</strong> module contains basic reset and fix rules, based on <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Core</li></ul><br />
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Before applying any typography and styling rules, some resets need to be applied to make sure that different elements display consistently on all browsers. The <strong>core</strong> module utilizes the ruleset of <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0 to apply those much needed resets and fixes. However, to keep the framework small, we removed some rules that only help with legacy browser support and also tweaked a lot of the rules around to use customizable variables so no duplicate rules are applied, taking up unnecessary space. The typography rules in <strong>core</strong> deal with a page's basics, like fonts and styling of headings and paragraphs, horizontal rules, colors, margins, padding etc.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>core</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Typography</h2></div>
<div class="section row">
<div class="col-sm-12">
<p>For the basic typography rules we did the following, along with other things presented below:</p>
<ul>
<li>We use a <a href="https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/">native font stack</a> to figure out the best font for your device.</li>
<li>We set the colors to <code>background: #f5f5f5;</code> and <code>color: #212121;</code>.</li>
<li>We use a <code>font-size</code> of <code>16px</code> for the root element.</li>
<li>We set <code>line-height</code> to <code>1.5</code>.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Headings</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal row">
<div class="col-sm-12 col-lg-6 col-lg-first"><h1>Heading 1<small>Subheading</small></h1></div>
<div class="col-sm-12 col-lg-6"><h2>Heading 2<small>Subheading</small></h2></div>
<div class="col-sm-12 col-lg-6 col-lg-last"><h3>Heading 3<small>Subheading</small></h3></div>
<div class="col-sm-12 col-lg-6 col-lg-first"><h4>Heading 4<small>Subheading</small></h4></div>
<div class="col-sm-12 col-lg-6"><h5>Heading 5<small>Subheading</small></h5></div>
<div class="col-sm-12 col-lg-6 col-lg-last"><h6>Heading 6<small>Subheading</small></h6></div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>All six of the HTML headings (<code>&lt;h1&gt;</code> - <code>&lt;h6&gt;</code>) are styled with simple rules, providing a clean base for your pages' headings. Apart from the headings themselves, complementary rules are provided for <code>&lt;small&gt;</code> elements inside headings, allowing you to define subheadings or explanatory text for those headings. These subheadings are stylized to display below the headings in smaller, lighter type.</p>
<h3>Sample code</h3>
<pre>&lt;h1&gt;Heading 1&lt;small&gt;Subheading&lt;/small&gt;&lt;/h1&gt;
&lt;h2&gt;Heading 2&lt;small&gt;Subheading&lt;/small&gt;&lt;/h2&gt;
&lt;h3&gt;Heading 3&lt;small&gt;Subheading&lt;/small&gt;&lt;/h3&gt;
&lt;h4&gt;Heading 4&lt;small&gt;Subheading&lt;/small&gt;&lt;/h4&gt;
&lt;h5&gt;Heading 5&lt;small&gt;Subheading&lt;/small&gt;&lt;/h5&gt;
&lt;h6&gt;Heading 6&lt;small&gt;Subheading&lt;/small&gt;&lt;/h6&gt;</pre><br>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Common textual elements</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><br><p>This is a paragraph with some sample text. Did you know <strong>mini.css</strong> v2.1 is codenamed <strong>Fermion</strong>? No? Well, now you do! Oh, by the way, that was some Bold text and here is some <em>text in Italics</em>. Maybe you want to know what our inline elements look like. For example a <a href="https://github.com/Chalarangelo/mini.css">link to the Github repository of mini.css</a> looks like that! Neat, right? Maybe you want to see some <code>inline code</code> or some sample <kbd>input</kbd>. Oh, also <small>small text</small> is cool, along with its siblings: the subscript<sub>hi!</sub> and the superscript<sup>hello!</sup>. Finally, check out the horizontal rule, preformatted code block and quotation below.</p><hr>
<pre>function sum(num1, num2) {
var num3 = num1 + num2;
console.log('Result: ' + num3);
}</pre>
<blockquote cite="Mr. Quotalot">This is some quoted text from elsewhere.</blockquote><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>The most common HTML5 elements must be things like <code>&lt;p&gt;</code>aragraphs, bold (<code>&lt;strong&gt;</code>) &amp; italics (<code>&lt;em&gt;</code>) text, links (<code>&lt;a&gt;</code>), horizontal rules (<code>&lt;hr&gt;</code>) and <code>&lt;small&gt;</code> text. These, along with a few others, are styled by default using clean, modern design to make your pages look cool and stand out from the rest of the internet.</p>
<h3>Sample code</h3>
<pre>&lt;p&gt;This is a paragraph with some &lt;strong&gt;bold text&lt;/strong&gt; and some &lt;em&gt;italics text&lt;/em&gt;.&lt;/p&gt;
&lt;a href=&quot;#&quot;&gt;This is a link.&lt;/a&gt;
&lt;small&gt;This is some small text.&lt;/small&gt;
&lt;sub&gt;Subscript&lt;/sub&gt;
&lt;sup&gt;Superscript&lt;/sup&gt;
&lt;code&gt;Inline code&lt;/code&gt;
&lt;kbd&gt;Keyboard Input&lt;/kbd&gt;
&lt;hr&gt;
&lt;pre&gt;This is some preformatted text.&lt;/pre&gt;
&lt;blockquote cite=&quot;Quotation source&quot;&gt;
This is some quoted text from another website or person.
&lt;/blockquote&gt;</pre><br>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Lists</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><br>
<ul>
<li>Apple</li>
<li>Orange</li>
<li>Strawberry</li>
</ul><br>
<ol>
<li>Wake up</li>
<li>Eat breakfast</li>
<li>Go to work</li>
</ol><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Lists are also very commonly used in websites and apps. We tweaked a few margins and paddings to save some space and make them align properly with the rest of the common HTML elements that we use, but both unordered lists (<code>&lt;ul&gt;</code>) and ordered lists (<code>&lt;ol&gt;</code>) are minimally pre-styled to make things a little bit easier for you.</p>
<h3>Sample code</h3>
<pre>&lt;ul&gt;
&lt;li&gt;Apple&lt;/li&gt;
&lt;li&gt;Orange&lt;/li&gt;
&lt;li&gt;Strawberry&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;Wake up&lt;/li&gt;
&lt;li&gt;Eat breakfast&lt;/li&gt;
&lt;li&gt;Go to work&lt;/li&gt;
&lt;/ol&gt;</pre><br>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Image responsiveness</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><img src="https://placehold.it/800x600"></div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Image elements (<code>&lt;img&gt;</code>) are responsive by default, without the need for any special classes or anything else. We made sure they will scale down as necessary to display properly on smaller devices, while keeping their original aspect ratio, but they will never scale up above their original size.</p>
<h3>Sample code</h3>
<pre>&lt;img src=&quot;...&quot;&gt;</pre><br>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

View file

@ -1,187 +1,187 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Customization</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, customization, flavor ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
.box-colored.red { background: #e53935; } .box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; } .box-left { text-align: left; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
</style>
</head>
<body>
<header class="sticky">
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Customization</h1>
<p><strong>mini.css</strong> is built in such a way that customizing it is really simple. You can try out one of the <a href="flavors.html">pre-defined flavors</a>, if you want to start learning and build something quickly. We strongly suggest, however, that you customize an existing flavor or build your own, by tweaking variables and using mixins, in order to create your own, unique style. In this page, we will try to give you some guidelines and tips on how to do so and explain a few more things about the inner workings of <strong>mini.css</strong>.</p><br>
<h2>Introduction &amp; basics</h2>
<p><strong>mini.css</strong> is written using <a href="http://sass-lang.com/">Sass</a>, a very popular CSS preprocessor. We use Sass to do four things:</p>
<ul>
<li>Make the code modular</li>
<li>Create variables that can be changed on the fly</li>
<li>Optimize the code</li>
<li>Create reusable mixins</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1">
<h3>Modules &amp; file structure</h3>
<p>At the heart of <strong>mini.css</strong> are modules - groups of classes and styles that aim to solve one set of needs. There are 10 modules in <strong>mini.css</strong>, which have been already written for you. All of the modules are built using partial files, named <code>_module_name.scss</code> and placed in the <code>src/mini</code> folder. You can edit any of the modules' code and/or add your own modules, following the same structure. The only thing you need to remember to do, in order to add your module to your flavor, is to add an <code>@import</code> statement after all the required variable declarations towards the bottom of your flavor file and it will be compiled along with the rest of <strong>mini.css</strong>. Similarly, to disable a module, just comment out its <code>@import</code> statement from the flavor file.</p>
</div>
<div class="col-sm-12 col-md-6 col-lg-5">
<h3>Variables</h3>
<p>Everything in <strong>mini.css</strong> is based on Sass variables. We try to make our variable names as descriptive as possible, usually using names like <code>$block-element-property-name</code>, but some things might vary a little bit. Changing the values of variables should be reasonably easy, simply navigate to the <code>src/flavors/flavor-name.scss</code> file for a pre-defined flavor and you will see a list of variables that you can tweak. Change the values as you see fit and your finalized stylesheet will reflect the changes you have made. We did our best to make everything as customizable as possible, so that different people can build entirely different flavors using the same building blocks.</p>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1">
<h3>Code optimization</h3>
<p>Building <strong>mini.css</strong> was no small task. Making it lightweight and customizable made things even harder, because these two things don't go well together most of the time. What we did was put more of the load on the preprocessor, instead of the final file. In order to accomplish this, we optimized as much of the code as possible, using conditions, flags and other tricks, so that compiling a flavor file might take one second longer, but loading won't. If you add any code to a flavor yourself, remember not only to make it customizable, but also to optimize it as best as possible.</p>
</div>
<div class="col-sm-12 col-md-6 col-lg-5">
<h3>Mixins</h3>
<p>A lot of elements and components can be styled in many ways and most of the time we want a few styles to be available, without having to rewrite everything. We utilized the <code>@mixin</code> directive of Sass wherever we could to make it possible for you to easily create styles for pre-existing components and elements without having to tweak the base code for said elements or components. To use a mixin, simply <code>@include</code> it, passing values to at least its mandatory parameters. We recommend you write mixins wherever possible, if you create any new modules for <strong>mini.css</strong>.</p>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<br>
<h2>Building a flavor</h2>
<p>Creating your own flavor can be as easy or as complicated as your needs. Adding and removing modules is as simple as adding an <code>@import</code> statement or commenting it out, after declaring all the required variables. In this section, we will briefly walk you through most of the variables usually present in a flavor, along with some flags and mixins. This section serves as a complementary documentation to the comment column present in our pre-defined flavors, instead of a replacement and should be always viewed alongside it.</p><br>
<div class="card fluid">
<div class="section"><h3>Core</h3></div>
<div class="section">
<p>The <strong>core</strong> module uses a lot of variables, most of which are pretty straightforward. Some of the most important ones are as follows:</p>
<ul>
<li><code>$fore-color</code> - base text color</li>
<li><code>$back-color</code> - base background color or image</li>
<li><code>$base-font-family</code> - font stack</li>
<li><code>$base-root-font-size</code> - font size of the page's root element, <strong>must be specified in <mark>px</mark> units</strong></li>
<li><code>$base-line-height</code> - base line height for the page's text</li>
<li><code>$body-margin</code> - margin of the <code>&lt;body&gt;</code> element</li>
</ul>
<p>Apart from the above variables, you should take note of the boolean <code>$apply-defaults-to-all</code>, which will reset font styling for all elements, utilizing the value of <code>$base-font-size</code> in the process. Certain elements like headings, horizontal rules and code blocks have some opinionated &quot;modern&quot; styles which can be turned on or off, using the boolean variables <code>$make-heading-smalltext-block</code>, <code>$horizontal-rule-fancy-style</code> and <code>$add-pre-element-sidebar</code>. The <code>$style-samp-element</code> and <code>$include-dfn-fix</code> boolean variables will either add styling for the elements they affect or completely omit it. This is part of the code optimization process, as most websites rarely use these elements. Finally, there are two boolean variables for link styling, <code>$apply-link-underline</code> and <code>$apply-link-hover-fade</code>.</p>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Grid</h3></div>
<div class="section">
<p>The <strong>grid</strong> module contains three important variables, the booleans <code>$use-four-step-grid</code> which determines if the grid has 3 or 4 breakpoints and <code>$include-parent-layout</code> which determines if predefined layouts should be included and the integer <code>$grid-column-count</code> which determines the amount of vertical columns used for the grid's layout. Apart from those, there are a few variables that set the names for the grid system's classes, prefixes and suffixes and the grid's screen size breakpoint definitions.</p>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Navigation</h3></div>
<div class="section">
<p>The <strong>navigation</strong> module contains a plethora of variables used in the styling of the navigational elements. Most of them concern colors, spacing and sizing or similar things. Bear in mind that the presentation of buttons inside the <code>&lt;header&gt;</code> element will be affected by the styling of all button elements, as defined in the <code>input_control</code> module. The variables that stand out in this module are <code>$nav-sublink-depth</code> which determines how deep a navigational hierarchy tree can be, along with the <code>$include-header-sticky</code> and <code>$include-footer-sticky</code> booleans that determine if sticky elements should be included for headers and footers respectively.</p>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Input Control</h3></div>
<div class="section">
<p>The <strong>input_control</strong> module is one of the larger modules, containg a lot of variables to style a multitude of elements. Forms and textual <code>&lt;input&gt;</code> elements utilize variables that concern color, spacing, sizing etc. One important variable concerning forms is the boolean <code>$include-fluid-input-group</code>, whose value determines if fluid input groups will be available. Button variables are more interesting, especially the ones concerning the opacity of button elements (<code>$button-back-opacity</code> and <code>$button-hover-back-opacity</code>). The <code>$hide-file-inputs</code> boolean variable determines how <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">&quot;file&quot;</span>&gt;</code> elements will be handled. Checkboxes and radio buttons also use a few variables concerning basic styling, but special attention needs to be paid to the <code>$checkbox-size</code> variable, as it determines a few attributes of both elements.</p>
<p>There are two mixins in the <strong>input_control</strong> module, specifically:</p>
<ul>
<li><code>make-button-alt-color</code> - button color variants</li>
<li><code>make-button-alt-style</code> - button size and spacing variants</li>
</ul>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Table</h3></div>
<div class="section">
<p>The <strong>table</strong> module's variables deal mostly with basic table styling. The <code>$table-mobile-breakpoint</code> is very important as it determines the breakpoint for responsive tables' mobile view, along with <code>$table-mobile-card-label</code> which determines the attribute that will be used to display the table headings on mobile devices. Finally, <code>$include-horizontal-table</code> determines if horizontal tables will be included.</p>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Card</h3></div>
<div class="section">
<p>The <strong>card</strong> modules' variables mostly deal with things like class names, spacing, sizing and colors. Cards offer a handful of mixins, specifically:</p>
<ul>
<li><code>make-card-alt-size</code> - card size variants</li>
<li><code>make-card-alt-color</code> - card color variants</li>
<li><code>make-card-section-alt-color</code> - card section color variants</li>
<li><code>make-card-section-alt-style</code> - card section size and spacing variants</li>
</ul>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Tab</h3></div>
<div class="section">
<p>The <strong>tab</strong> module utilizes a few naming and color variables, along with some sizing and spacing variables to deal with presentation and functionality. Many of the sizing variables are very dependent on each other's values. The <code>$tab-stacked-breakpoint</code> variable is especially important, as it determines the mobile view breakpoint for the tabs component.</p>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Contextual</h3></div>
<div class="section">
<p>The <strong>contextual</strong> module features, apart from basic naming and styling variables, a few things of note. The boolean variable <code>$alert-include-animated</code> determines if animated alerts will be inluded or not. Likewise, the boolean variable <code>$include-tooltip</code> determines if tooltips shoud be included. There is also a handful of mixins, which are the most important part of the contextual module as they are what makes it useful:</p>
<ul>
<li><code>make-mark-alt-color</code> - mark color variants</li>
<li><code>make-mark-alt-style</code> - mark size and spacing variants</li>
<li><code>make-alert-alt-color</code> - alert color variants</li>
<li><code>make-alert-alt-style</code> - alert size and spacing variants</li>
<li><code>make-tooltip-alt-color</code> - tooltip color variants</li>
<li><code>make-tooltip-alt-style</code> - tooltip size and spacing variants</li>
</ul>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Progress</h3></div>
<div class="section">
<p>The <strong>progress</strong> module contains lots of variables that affect basic styling, but it also features a few interesting mixins:</p>
<ul>
<li><code>make-progress-inline</code> - inline progress variant</li>
<li><code>make-progress-alt-color</code> - progress color variants</li>
<li><code>make-progress-alt-style</code> - progress size and spacing variants</li>
<li><code>make-spinner-donut-alt-color</code> - spinner donut color variants</li>
<li><code>make-spinner-donut-alt-style</code> - spinner donut size and spacing variants</li>
</ul>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Utility</h3></div>
<div class="section">
<p>The <strong>utility</strong> module contains a few variables dealing with naming and basic styling, while some boolean variables like <code>$include-floats</code>, <code>$include-clearfix</code> and <code>$include-center-block</code> can be toggled on or off to enable or disable legacy features. The most important feature of this module, however, are its mixins:</p>
<ul>
<li><code>make-border-generic</code> - generic border</li>
<li><code>make-border-radial-style</code> - border radius variants</li>
<li><code>make-box-shadow-generic</code> - generic shadow variants</li>
<li><code>make-margin-responsive</code> - responsive margins</li>
<li><code>make-padding-responsive</code> - responsive paddings</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you would rather use one of the pre-defined flavors, check out our <a href="flavors.html">flavors</a> page for a list of all flavors currently available.</p>
</div>
</div>
<div class="row box-centered"><div class="col-sm-12 col-lg-10 col-lg-offset-1"></div></div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Customization</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, customization, flavor ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
.box-colored.red { background: #e53935; } .box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; } .box-left { text-align: left; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
</style>
</head>
<body>
<header class="sticky">
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Customization</h1>
<p><strong>mini.css</strong> is built in such a way that customizing it is really simple. You can try out one of the <a href="flavors.html">pre-defined flavors</a>, if you want to start learning and build something quickly. We strongly suggest, however, that you customize an existing flavor or build your own, by tweaking variables and using mixins, in order to create your own, unique style. In this page, we will try to give you some guidelines and tips on how to do so and explain a few more things about the inner workings of <strong>mini.css</strong>.</p><br>
<h2>Introduction &amp; basics</h2>
<p><strong>mini.css</strong> is written using <a href="http://sass-lang.com/">Sass</a>, a very popular CSS preprocessor. We use Sass to do four things:</p>
<ul>
<li>Make the code modular</li>
<li>Create variables that can be changed on the fly</li>
<li>Optimize the code</li>
<li>Create reusable mixins</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1">
<h3>Modules &amp; file structure</h3>
<p>At the heart of <strong>mini.css</strong> are modules - groups of classes and styles that aim to solve one set of needs. There are 10 modules in <strong>mini.css</strong>, which have been already written for you. All of the modules are built using partial files, named <code>_module_name.scss</code> and placed in the <code>src/mini</code> folder. You can edit any of the modules' code and/or add your own modules, following the same structure. The only thing you need to remember to do, in order to add your module to your flavor, is to add an <code>@import</code> statement after all the required variable declarations towards the bottom of your flavor file and it will be compiled along with the rest of <strong>mini.css</strong>. Similarly, to disable a module, just comment out its <code>@import</code> statement from the flavor file.</p>
</div>
<div class="col-sm-12 col-md-6 col-lg-5">
<h3>Variables</h3>
<p>Everything in <strong>mini.css</strong> is based on Sass variables. We try to make our variable names as descriptive as possible, usually using names like <code>$block-element-property-name</code>, but some things might vary a little bit. Changing the values of variables should be reasonably easy, simply navigate to the <code>src/flavors/flavor-name.scss</code> file for a pre-defined flavor and you will see a list of variables that you can tweak. Change the values as you see fit and your finalized stylesheet will reflect the changes you have made. We did our best to make everything as customizable as possible, so that different people can build entirely different flavors using the same building blocks.</p>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1">
<h3>Code optimization</h3>
<p>Building <strong>mini.css</strong> was no small task. Making it lightweight and customizable made things even harder, because these two things don't go well together most of the time. What we did was put more of the load on the preprocessor, instead of the final file. In order to accomplish this, we optimized as much of the code as possible, using conditions, flags and other tricks, so that compiling a flavor file might take one second longer, but loading won't. If you add any code to a flavor yourself, remember not only to make it customizable, but also to optimize it as best as possible.</p>
</div>
<div class="col-sm-12 col-md-6 col-lg-5">
<h3>Mixins</h3>
<p>A lot of elements and components can be styled in many ways and most of the time we want a few styles to be available, without having to rewrite everything. We utilized the <code>@mixin</code> directive of Sass wherever we could to make it possible for you to easily create styles for pre-existing components and elements without having to tweak the base code for said elements or components. To use a mixin, simply <code>@include</code> it, passing values to at least its mandatory parameters. We recommend you write mixins wherever possible, if you create any new modules for <strong>mini.css</strong>.</p>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<br>
<h2>Building a flavor</h2>
<p>Creating your own flavor can be as easy or as complicated as your needs. Adding and removing modules is as simple as adding an <code>@import</code> statement or commenting it out, after declaring all the required variables. In this section, we will briefly walk you through most of the variables usually present in a flavor, along with some flags and mixins. This section serves as a complementary documentation to the comment column present in our pre-defined flavors, instead of a replacement and should be always viewed alongside it.</p><br>
<div class="card fluid">
<div class="section"><h3>Core</h3></div>
<div class="section">
<p>The <strong>core</strong> module uses a lot of variables, most of which are pretty straightforward. Some of the most important ones are as follows:</p>
<ul>
<li><code>$fore-color</code> - base text color</li>
<li><code>$back-color</code> - base background color or image</li>
<li><code>$base-font-family</code> - font stack</li>
<li><code>$base-root-font-size</code> - font size of the page's root element, <strong>must be specified in <mark>px</mark> units</strong></li>
<li><code>$base-line-height</code> - base line height for the page's text</li>
<li><code>$body-margin</code> - margin of the <code>&lt;body&gt;</code> element</li>
</ul>
<p>Apart from the above variables, you should take note of the boolean <code>$apply-defaults-to-all</code>, which will reset font styling for all elements, utilizing the value of <code>$base-font-size</code> in the process. Certain elements like headings, horizontal rules and code blocks have some opinionated &quot;modern&quot; styles which can be turned on or off, using the boolean variables <code>$make-heading-smalltext-block</code>, <code>$horizontal-rule-fancy-style</code> and <code>$add-pre-element-sidebar</code>. The <code>$style-samp-element</code> and <code>$include-dfn-fix</code> boolean variables will either add styling for the elements they affect or completely omit it. This is part of the code optimization process, as most websites rarely use these elements. Finally, there are two boolean variables for link styling, <code>$apply-link-underline</code> and <code>$apply-link-hover-fade</code>.</p>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Grid</h3></div>
<div class="section">
<p>The <strong>grid</strong> module contains three important variables, the booleans <code>$use-four-step-grid</code> which determines if the grid has 3 or 4 breakpoints and <code>$include-parent-layout</code> which determines if predefined layouts should be included and the integer <code>$grid-column-count</code> which determines the amount of vertical columns used for the grid's layout. Apart from those, there are a few variables that set the names for the grid system's classes, prefixes and suffixes and the grid's screen size breakpoint definitions.</p>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Navigation</h3></div>
<div class="section">
<p>The <strong>navigation</strong> module contains a plethora of variables used in the styling of the navigational elements. Most of them concern colors, spacing and sizing or similar things. Bear in mind that the presentation of buttons inside the <code>&lt;header&gt;</code> element will be affected by the styling of all button elements, as defined in the <code>input_control</code> module. The variables that stand out in this module are <code>$nav-sublink-depth</code> which determines how deep a navigational hierarchy tree can be, along with the <code>$include-header-sticky</code> and <code>$include-footer-sticky</code> booleans that determine if sticky elements should be included for headers and footers respectively.</p>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Input Control</h3></div>
<div class="section">
<p>The <strong>input_control</strong> module is one of the larger modules, containg a lot of variables to style a multitude of elements. Forms and textual <code>&lt;input&gt;</code> elements utilize variables that concern color, spacing, sizing etc. One important variable concerning forms is the boolean <code>$include-fluid-input-group</code>, whose value determines if fluid input groups will be available. Button variables are more interesting, especially the ones concerning the opacity of button elements (<code>$button-back-opacity</code> and <code>$button-hover-back-opacity</code>). The <code>$hide-file-inputs</code> boolean variable determines how <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">&quot;file&quot;</span>&gt;</code> elements will be handled. Checkboxes and radio buttons also use a few variables concerning basic styling, but special attention needs to be paid to the <code>$checkbox-size</code> variable, as it determines a few attributes of both elements.</p>
<p>There are two mixins in the <strong>input_control</strong> module, specifically:</p>
<ul>
<li><code>make-button-alt-color</code> - button color variants</li>
<li><code>make-button-alt-style</code> - button size and spacing variants</li>
</ul>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Table</h3></div>
<div class="section">
<p>The <strong>table</strong> module's variables deal mostly with basic table styling. The <code>$table-mobile-breakpoint</code> is very important as it determines the breakpoint for responsive tables' mobile view, along with <code>$table-mobile-card-label</code> which determines the attribute that will be used to display the table headings on mobile devices. Finally, <code>$include-horizontal-table</code> determines if horizontal tables will be included.</p>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Card</h3></div>
<div class="section">
<p>The <strong>card</strong> modules' variables mostly deal with things like class names, spacing, sizing and colors. Cards offer a handful of mixins, specifically:</p>
<ul>
<li><code>make-card-alt-size</code> - card size variants</li>
<li><code>make-card-alt-color</code> - card color variants</li>
<li><code>make-card-section-alt-color</code> - card section color variants</li>
<li><code>make-card-section-alt-style</code> - card section size and spacing variants</li>
</ul>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Tab</h3></div>
<div class="section">
<p>The <strong>tab</strong> module utilizes a few naming and color variables, along with some sizing and spacing variables to deal with presentation and functionality. Many of the sizing variables are very dependent on each other's values. The <code>$tab-stacked-breakpoint</code> variable is especially important, as it determines the mobile view breakpoint for the tabs component.</p>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Contextual</h3></div>
<div class="section">
<p>The <strong>contextual</strong> module features, apart from basic naming and styling variables, a few things of note. The boolean variable <code>$alert-include-animated</code> determines if animated alerts will be inluded or not. Likewise, the boolean variable <code>$include-tooltip</code> determines if tooltips shoud be included. There is also a handful of mixins, which are the most important part of the contextual module as they are what makes it useful:</p>
<ul>
<li><code>make-mark-alt-color</code> - mark color variants</li>
<li><code>make-mark-alt-style</code> - mark size and spacing variants</li>
<li><code>make-alert-alt-color</code> - alert color variants</li>
<li><code>make-alert-alt-style</code> - alert size and spacing variants</li>
<li><code>make-tooltip-alt-color</code> - tooltip color variants</li>
<li><code>make-tooltip-alt-style</code> - tooltip size and spacing variants</li>
</ul>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Progress</h3></div>
<div class="section">
<p>The <strong>progress</strong> module contains lots of variables that affect basic styling, but it also features a few interesting mixins:</p>
<ul>
<li><code>make-progress-inline</code> - inline progress variant</li>
<li><code>make-progress-alt-color</code> - progress color variants</li>
<li><code>make-progress-alt-style</code> - progress size and spacing variants</li>
<li><code>make-spinner-donut-alt-color</code> - spinner donut color variants</li>
<li><code>make-spinner-donut-alt-style</code> - spinner donut size and spacing variants</li>
</ul>
</div>
</div>
<div class="card fluid">
<div class="section"><h3>Utility</h3></div>
<div class="section">
<p>The <strong>utility</strong> module contains a few variables dealing with naming and basic styling, while some boolean variables like <code>$include-floats</code>, <code>$include-clearfix</code> and <code>$include-center-block</code> can be toggled on or off to enable or disable legacy features. The most important feature of this module, however, are its mixins:</p>
<ul>
<li><code>make-border-generic</code> - generic border</li>
<li><code>make-border-radial-style</code> - border radius variants</li>
<li><code>make-box-shadow-generic</code> - generic shadow variants</li>
<li><code>make-margin-responsive</code> - responsive margins</li>
<li><code>make-padding-responsive</code> - responsive paddings</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you would rather use one of the pre-defined flavors, check out our <a href="flavors.html">flavors</a> page for a list of all flavors currently available.</p>
</div>
</div>
<div class="row box-centered"><div class="col-sm-12 col-lg-10 col-lg-offset-1"></div></div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

View file

@ -1,76 +1,76 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Flavors</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, flavor, flavors ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
.box-colored.red { background: #e53935; } .box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto;} [class^='col-'] .card.fluid { margin: 2px 0 20px; }
h2 > a{ font-size: 1rem; float: right;} .box-left { text-align: left; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
</style>
</head>
<body>
<header class="sticky">
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Flavors</h1>
<p>One of the core ideas behind <strong>mini.css</strong> is its flavor system. A flavor is the final compiled stylesheet a website or web app uses. When you start using <strong>mini.css</strong>, you usually try out the default flavor, using the following reference inside your HTML page's <code>&lt;head&gt;</code> tag:</p>
<pre>&lt;<span class="fore-tertiary">link</span> <span class="fore-secondary">rel</span>=<span class="fore-primary">&quot;stylesheet&quot;</span> <span class="fore-secondary">href</span>=<span class="fore-primary">&quot;https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css&quot;</span>&gt;</pre><br>
<p>There are, however a handful of other flavors included with <strong>mini.css</strong>. Below, you can see a full list of them:</p><br>
<ul style="margin-left:0px; padding-left: 10px">
<li class="card fluid">
<h2 class="section double-padded">Default <small>mini-default</small></h2>
<pre class="section double-padded" style="border-left:0; box-shadow: none;">&lt;<span class="fore-tertiary">link</span> <span class="fore-secondary">rel</span>=<span class="fore-primary">&quot;stylesheet&quot;</span> <span class="fore-secondary">href</span>=<span class="fore-primary">&quot;https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css&quot;</span>&gt;</pre>
<p class="section double-padded">The default flavor for <strong>mini.css</strong> uses a light gray background and gray-black foreground color. Certain containers, such as cards and tabs use white-gray backgrounds. The grid system has 12 columns and most of the components and modules use sharp corners with blurred shadows to give it a material-like design. All of the colors used in this flavor are based on <a href="https://material.google.com/style/color.html">Google's Material design color palette</a>.</p>
<div class="section double-padded">
<p><strong>Author:</strong> <a href="https://github.com/Chalarangelo">Chalarangelo</a></p>
<p><strong>Latest version:</strong> v2.1.0</p>
<p><strong>Size:</strong> 7 KB</p>
</p>
</div>
</li>
<li class="card fluid">
<h2 class="section double-padded">Sucroa <a href="http://codepen.io/chalarangelo/pen/YNKYgz" target="_blank" class="button small"><i class="fa fa-codepen" aria-hidden="true"></i>&nbsp;View on Codepen</a><small>mini-sucroa</small></h2>
<pre class="section double-padded" style="border-left:0; box-shadow: none;">&lt;<span class="fore-tertiary">link</span> <span class="fore-secondary">rel</span>=<span class="fore-primary">&quot;stylesheet&quot;</span> <span class="fore-secondary">href</span>=<span class="fore-primary">&quot;https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-sucroa.min.css&quot;</span>&gt;</pre>
<p class="section double-padded">Sucroa is a full flavor that uses a yellow-pink-lilac background color palette with dark purple-black foreground colors. It uses the default naming conventions (<code>.primary</code>, <code>.secondary</code> etc.). The grid system has 12 columns and most components use soft shadows combined with rounded corners. The card module's <code>.dark</code> and <code>.darker</code> classes have been replaced by the <code>.light</code> and <code>.lighter</code> classes respectively. Finally, <code>.animated</code> alerts and <code>.horizontal</code> tables are not available.</p>
<div class="section double-padded">
<p><strong>Author:</strong> <a href="https://github.com/AngieDaskalakis">Angeliki Daskalakis</a></p>
<p><strong>Latest version:</strong> v2.1.0</p>
<p><strong>Size:</strong> 7 KB (loads external fonts)</p>
</p>
</div>
</li>
</ul>
<p>If you would rather modify one of the pre-defined flavors or create your own, check out our <a href="customization.html">customization</a> page for instructions.</p>
</div>
</div>
<div class="row box-centered">
<div class="col-sm-12">
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Flavors</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, flavor, flavors ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
.box-colored.red { background: #e53935; } .box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto;} [class^='col-'] .card.fluid { margin: 2px 0 20px; }
h2 > a{ font-size: 1rem; float: right;} .box-left { text-align: left; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
</style>
</head>
<body>
<header class="sticky">
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Flavors</h1>
<p>One of the core ideas behind <strong>mini.css</strong> is its flavor system. A flavor is the final compiled stylesheet a website or web app uses. When you start using <strong>mini.css</strong>, you usually try out the default flavor, using the following reference inside your HTML page's <code>&lt;head&gt;</code> tag:</p>
<pre>&lt;<span class="fore-tertiary">link</span> <span class="fore-secondary">rel</span>=<span class="fore-primary">&quot;stylesheet&quot;</span> <span class="fore-secondary">href</span>=<span class="fore-primary">&quot;https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css&quot;</span>&gt;</pre><br>
<p>There are, however a handful of other flavors included with <strong>mini.css</strong>. Below, you can see a full list of them:</p><br>
<ul style="margin-left:0px; padding-left: 10px">
<li class="card fluid">
<h2 class="section double-padded">Default <small>mini-default</small></h2>
<pre class="section double-padded" style="border-left:0; box-shadow: none;">&lt;<span class="fore-tertiary">link</span> <span class="fore-secondary">rel</span>=<span class="fore-primary">&quot;stylesheet&quot;</span> <span class="fore-secondary">href</span>=<span class="fore-primary">&quot;https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css&quot;</span>&gt;</pre>
<p class="section double-padded">The default flavor for <strong>mini.css</strong> uses a light gray background and gray-black foreground color. Certain containers, such as cards and tabs use white-gray backgrounds. The grid system has 12 columns and most of the components and modules use sharp corners with blurred shadows to give it a material-like design. All of the colors used in this flavor are based on <a href="https://material.google.com/style/color.html">Google's Material design color palette</a>.</p>
<div class="section double-padded">
<p><strong>Author:</strong> <a href="https://github.com/Chalarangelo">Chalarangelo</a></p>
<p><strong>Latest version:</strong> v2.1.0</p>
<p><strong>Size:</strong> 7 KB</p>
</p>
</div>
</li>
<li class="card fluid">
<h2 class="section double-padded">Sucroa <a href="http://codepen.io/chalarangelo/pen/YNKYgz" target="_blank" class="button small"><i class="fa fa-codepen" aria-hidden="true"></i>&nbsp;View on Codepen</a><small>mini-sucroa</small></h2>
<pre class="section double-padded" style="border-left:0; box-shadow: none;">&lt;<span class="fore-tertiary">link</span> <span class="fore-secondary">rel</span>=<span class="fore-primary">&quot;stylesheet&quot;</span> <span class="fore-secondary">href</span>=<span class="fore-primary">&quot;https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-sucroa.min.css&quot;</span>&gt;</pre>
<p class="section double-padded">Sucroa is a full flavor that uses a yellow-pink-lilac background color palette with dark purple-black foreground colors. It uses the default naming conventions (<code>.primary</code>, <code>.secondary</code> etc.). The grid system has 12 columns and most components use soft shadows combined with rounded corners. The card module's <code>.dark</code> and <code>.darker</code> classes have been replaced by the <code>.light</code> and <code>.lighter</code> classes respectively. Finally, <code>.animated</code> alerts and <code>.horizontal</code> tables are not available.</p>
<div class="section double-padded">
<p><strong>Author:</strong> <a href="https://github.com/AngieDaskalakis">Angeliki Daskalakis</a></p>
<p><strong>Latest version:</strong> v2.1.0</p>
<p><strong>Size:</strong> 7 KB (loads external fonts)</p>
</p>
</div>
</li>
</ul>
<p>If you would rather modify one of the pre-defined flavors or create your own, check out our <a href="customization.html">customization</a> page for instructions.</p>
</div>
</div>
<div class="row box-centered">
<div class="col-sm-12">
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -1,200 +1,200 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Minimal, responsive, style-agnostic CSS framework</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, toolkit">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
#top-area { height: 320px; background: -webkit-linear-gradient(#455a64,#192024); background: linear-gradient(#455a64,#192024);}
#top-logo {display: inline-block; height: 66px; width: 70px; margin: 64px auto -30px; border-radius: 1px; background: #558b2f; padding: 8px; padding-top: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.35);}
#top-heading { color: #f5f5f5; font-size: 2.4em; text-shadow: 0 1px 2px rgba(0,0,0,0.35); margin-bottom: -8px;}
@media (min-width: 768px) { #top-area {height: 440px;} #top-logo {margin: 88px auto -24px;} #top-heading {margin-bottom: -6px;} }
#top-version-tag { padding: 4px 6px; font-size: 0.85em; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,0.35); }
.box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
.box-colored.red { background: #e53935; } .box-centered { text-align: center; }
.box-centered > .card.fluid { -webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start;
justify-content: flex-start; -webkit-align-self: auto; align-self: auto;}
[class^='col-'] .card.fluid { margin: 2px 0 20px; } [class^='fore-'] { font-family: monospace, monospace;}
.fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
</style>
</head>
<body>
<div class="container" id="top-area"><div class="row">
<div class="col-sm"><div class="box-centered"> <img src="mini-logo.svg" id="top-logo">
<h1 id="top-heading"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></h1>
<mark class="tertiary" id="top-version-tag">v2.1</mark>
</div></div>
</div></div>
<header class="sticky">
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 60px; padding-bottom: 20px;">
<div class="col-sm-12 col-lg-10 col-lg-offset-1 row">
<div class="col-sm-12 col-md box-centered row">
<div class="card fluid">
<div class="section">
<h2>Minimal<small>Size matters!</small></h2><br> <i class="fa fa-compress fa-4x" aria-hidden="true"></i><br><br>
<p><strong>mini.css</strong> aims to provide as much functionality as possible in less than 7KB gzipped. This very small footprint means that your websites and web applications will load faster, while still looking great utilising the modern components we provide!</p><br>
</div>
</div>
</div>
<div class="col-sm-12 col-md box-centered row">
<div class="card fluid">
<div class="section">
<h2>Responsive<small>Think mobile!</small></h2><br> <i class="fa fa-mobile fa-4x" aria-hidden="true"></i><br><br>
<p><strong>mini.css</strong> is crafted with both desktops and mobile devices in mind. All of its components are well-tested on different devices and will respond to any changes in the viewport, allowing for an experience tailored to each user's device!</p><br>
</div>
</div>
</div>
<div class="col-sm-12 col-md box-centered row">
<div class="card fluid">
<div class="section">
<h2>Style-agnostic<small>Infinitely customizable!</small></h2><br> <i class="fa fa-paint-brush fa-4x" aria-hidden="true"></i><br><br>
<p><strong>mini.css</strong> provides you with a customizable flavor system, allowing you to be a designer without all the hard work. This way you can create your own custom design and personalize your websites any way you want!</p><br>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h2>Setup &amp; usage</h2>
<p>You can import the default flavor of <strong>mini.css</strong> in your webpage by simply adding the following reference inside your HTML page's <code>&lt;head&gt;</code> tag:</p>
<pre>&lt;<span class="fore-tertiary">link</span> <span class="fore-secondary">rel</span>=<span class="fore-primary">&quot;stylesheet&quot;</span> <span class="fore-secondary">href</span>=<span class="fore-primary">&quot;https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css&quot;</span>&gt;</pre><br>
<p>If you want to download the package using your favorite package manager, you can use either <strong>Bower</strong> or <strong>NPM</strong>:</p>
<div class="row">
<div class="col-sm-12 col-md-6"><pre><span class="fore-tertiary">bower install</span> <span class="fore-primary">mini.css</span></pre></div>
<div class="col-sm-12 col-md-6"><pre><span class="fore-tertiary">npm install</span> <span class="fore-primary">mini.css</span></pre></div>
</div><br>
<p>If you are interested in tinkering with the flavor files and cooking your own flavor, check out the <a href="customization.html">Customization</a> page for information, tips on how to get started and general guidelines.</p><br><hr>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<h2>Quick overview</h2>
<p>Take a couple of minutes to learn how <strong>mini.css</strong> differs from all those other UI frameworks (Bootstrap, Semantic UI etc):</p>
<table> <caption>Framework file size comparison</caption>
<thead> <tr> <th>Name</th><th>Version</th><th>Size (uncompressed)</th><th>Size (minified)</th><th>Size (gzipped)</th> </tr> </thead>
<tbody>
<tr>
<td data-label="Name">Bootstrap</td>
<td data-label="Version"><a href="https://github.com/twbs/bootstrap/blob/0b9c4a4007c44201dce9a6cc1a38407005c26c86/dist/css/bootstrap.css">v3.3.7</a></td>
<td data-label="Size (uncompressed)">143 KB</td><td data-label="Size (minified)">117 KB</td><td data-label="Size (gzipped)">20 KB</td>
</tr>
<tr>
<td data-label="Name">Material Framework</td>
<td data-label="Version"><a href="https://github.com/nt1m/material-framework/blob/c5f7fed174686118dded31aecca311d4cc9d8b07/css/material.css">v3.0</a></td>
<td data-label="Size (uncompressed)">114 KB</td><td data-label="Size (minified)">90 KB</td><td data-label="Size (gzipped)">18 KB</td>
</tr>
<tr>
<td data-label="Name">mini.css</td>
<td data-label="Version"><a href="https://github.com/chalarangelo/mini.css/blob/v2.1.0/dist/css/mini-default.css">v2.1</a></td>
<td data-label="Size (uncompressed)">47 KB</td><td data-label="Size (minified)">36 KB</td><td data-label="Size (gzipped)">7 KB</td>
</tr>
<tr>
<td data-label="Name">Semantic UI</td>
<td data-label="Version"><a href="https://github.com/Semantic-Org/Semantic-UI/blob/0b1b59b0e1c780e842820df5c1904a162034812c/dist/semantic.css">v2.2.6</a></td>
<td data-label="Size (uncompressed)">730 KB</td><td data-label="Size (minified)">550 KB</td><td data-label="Size (gzipped)">95 KB</td>
</tr>
<tr>
<td data-label="Name">Zurb Foundation</td>
<td data-label="Version"><a href="https://github.com/zurb/foundation-sites/blob/ab172838d6de406204956015c9fd393c5a526e0e/dist/foundation.css">v3.0</a></td>
<td data-label="Size (uncompressed)">90 KB</td><td data-label="Size (minified)">64 KB</td><td data-label="Size (gzipped)">12 KB</td>
</tr>
</tbody>
</table><br>
<p><mark class="secondary" style="padding: 3px 6px;"><i class="fa fa-lg fa-exclamation" aria-hidden="true"></i></mark>&nbsp;The above comparison takes into account only the CSS files of each framework. <strong>mini.css</strong>'s size is an approximation due to the nature of its flavor system. The calculated results were produced using <a href="http://refresh-sf.com/">Refresh-SF</a>.</p><br>
</div>
<div class="col-sm-12 col-md col-lg-5 col-lg-offset-1">
<h3>Module list</h3>
<ul>
<li><strong>Core</strong> - Resets, typography rules and fixes</li>
<li><strong>Grid</strong> - Powerful, responsive flexbox-based grid</li>
<li><strong>Navigation</strong> - Common elements for navigation</li>
<li><strong>Input Control</strong> - Forms, buttons and inputs</li>
<li><strong>Table</strong> - Modern, responsive tables</li>
<li><strong>Card</strong> - Sleek, modern content containers</li>
<li><strong>Tab</strong> - Responsive tabs and accordions</li>
<li><strong>Contextual</strong> - Contextual highlights and alerts</li>
<li><strong>Progress</strong> - Modern progress bars and loaders</li>
<li><strong>Utility</strong> - Utility and helper classes</li>
</ul>
</div>
<div class="col-sm-12 col-md col-lg-5">
<h3>Why does <strong>mini.css</strong> have so few modules?</h3>
<p>Modules are what make frameworks so powerful, by giving developers the essential components they need to structure and style their websites. <strong>mini.css</strong> simplifies the crafting and learning process for new developers by providing a handful of very powerful modules that can do many different things. This way, new developers will only have to learn a few different HTML structures and patterns, while having the ability to build a lot of interesting things with them. For example, cards can be used for almost any type of layout and can be customized to behave exactly as the developer needs them to. Tabs, on the other hand, are very responsive on mobile, collapsing to a stack below a certain width, but they can also be forced into a stack, allowing accordions and collapses to be built using the same building block as tabs.</p>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<table> <caption>Browser support</caption>
<thead> <tr> <th>Browser</th><th>Not supported</th><th>Partially supported</th><th>Fully supported</th> </tr> </thead>
<tbody>
<tr>
<td data-label="Browser"><i class="fa fa-internet-explorer" aria-hidden="true" style="color: #1565c0;"></i>&nbsp;Internet Explorer</td>
<td data-label="Not supported">8-</td><td data-label="Partially supported">9-10</td><td data-label="Fully supported">11+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-edge" aria-hidden="true" style="color: #0d47a1;"></i>&nbsp;Edge</td>
<td data-label="Not supported">n/a</td><td data-label="Partially supported">n/a</td><td data-label="Fully supported">12+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-firefox" aria-hidden="true" style="color: #bf360c;"></i>&nbsp;Firefox</td>
<td data-label="Not supported">21-</td><td data-label="Partially supported">22-27</td><td data-label="Fully supported">28+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-chrome" aria-hidden="true" style="color: #ff8f00;"></i>&nbsp;Chrome</td>
<td data-label="Not supported">20-</td><td data-label="Partially supported">n/a</td><td data-label="Fully supported">21+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-safari" aria-hidden="true" style="color: #0277bd;"></i>&nbsp;Safari</td>
<td data-label="Not supported">6-</td><td data-label="Partially supported">n/a</td><td data-label="Fully supported">6.1+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-opera" aria-hidden="true" style="color: #b71c1c;"></i>&nbsp;Opera</td>
<td data-label="Not supported">11.5-</td><td data-label="Partially supported">12.1-16</td><td data-label="Fully supported">17+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-android" aria-hidden="true" style="color: #827717;"></i>&nbsp;Android Browser</td>
<td data-label="Not supported">4.3-</td><td data-label="Partially supported">n/a</td><td data-label="Fully supported">4.4+</td>
</tr>
</tbody>
</table><br>
<p><mark class="secondary" style="padding: 3px 6px;"><i class="fa fa-lg fa-exclamation" aria-hidden="true"></i></mark>&nbsp;Due to the way <strong>mini.css</strong> is crafted, some legacy browsers are not supported anymore and some others are partially supported. This could be a dealbreaker for some developers, however most legacy browsers will display a less feature-rich and modern website. Apart from the table above, note that some mobile browsers like Opera Mini, IE Mobile and UC Browser for Android are officially supported, but some features may not be displayed properly or behave as expected due to the browsers themselves.</p><br><hr>
</div>
</div>
<div class="row" style="padding-bottom: 60px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h2>Getting started</h2>
<p>If you are still here after reading this far, we will assume you are interested or at least curious. Based on that assumption, here are a few links to help get you started:</p>
<ul>
<li>For a quick guide on getting started, you might wanna take a look at the available <a href="modules.html">modules</a> list and the tutorials provided for each one!</li>
<li>If you are familiar with <strong>mini.css</strong> and want a cheat sheet or quick reference guide, check the <a href="quick_reference.html">quick reference</a> page!</li>
<li><strong>mini.css</strong> comes with a few nice pre-built customizable <a href="flavors.html">flavors</a>. See which one of them better suits your needs!</li>
<li>If you are more experienced or demanding, you can always take a look at the <a href="customization.html">customization</a> section to cook up a flavor of your own custom-tailored to your needs!</li>
</ul>
</div>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Minimal, responsive, style-agnostic CSS framework</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, toolkit">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
#top-area { height: 320px; background: -webkit-linear-gradient(#455a64,#192024); background: linear-gradient(#455a64,#192024);}
#top-logo {display: inline-block; height: 66px; width: 70px; margin: 64px auto -30px; border-radius: 1px; background: #558b2f; padding: 8px; padding-top: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.35);}
#top-heading { color: #f5f5f5; font-size: 2.4em; text-shadow: 0 1px 2px rgba(0,0,0,0.35); margin-bottom: -8px;}
@media (min-width: 768px) { #top-area {height: 440px;} #top-logo {margin: 88px auto -24px;} #top-heading {margin-bottom: -6px;} }
#top-version-tag { padding: 4px 6px; font-size: 0.85em; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,0.35); }
.box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
.box-colored.red { background: #e53935; } .box-centered { text-align: center; }
.box-centered > .card.fluid { -webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start;
justify-content: flex-start; -webkit-align-self: auto; align-self: auto;}
[class^='col-'] .card.fluid { margin: 2px 0 20px; } [class^='fore-'] { font-family: monospace, monospace;}
.fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
</style>
</head>
<body>
<div class="container" id="top-area"><div class="row">
<div class="col-sm"><div class="box-centered"> <img src="mini-logo.svg" id="top-logo">
<h1 id="top-heading"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></h1>
<mark class="tertiary" id="top-version-tag">v2.1</mark>
</div></div>
</div></div>
<header class="sticky">
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 60px; padding-bottom: 20px;">
<div class="col-sm-12 col-lg-10 col-lg-offset-1 row">
<div class="col-sm-12 col-md box-centered row">
<div class="card fluid">
<div class="section">
<h2>Minimal<small>Size matters!</small></h2><br> <i class="fa fa-compress fa-4x" aria-hidden="true"></i><br><br>
<p><strong>mini.css</strong> aims to provide as much functionality as possible in less than 7KB gzipped. This very small footprint means that your websites and web applications will load faster, while still looking great utilising the modern components we provide!</p><br>
</div>
</div>
</div>
<div class="col-sm-12 col-md box-centered row">
<div class="card fluid">
<div class="section">
<h2>Responsive<small>Think mobile!</small></h2><br> <i class="fa fa-mobile fa-4x" aria-hidden="true"></i><br><br>
<p><strong>mini.css</strong> is crafted with both desktops and mobile devices in mind. All of its components are well-tested on different devices and will respond to any changes in the viewport, allowing for an experience tailored to each user's device!</p><br>
</div>
</div>
</div>
<div class="col-sm-12 col-md box-centered row">
<div class="card fluid">
<div class="section">
<h2>Style-agnostic<small>Infinitely customizable!</small></h2><br> <i class="fa fa-paint-brush fa-4x" aria-hidden="true"></i><br><br>
<p><strong>mini.css</strong> provides you with a customizable flavor system, allowing you to be a designer without all the hard work. This way you can create your own custom design and personalize your websites any way you want!</p><br>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h2>Setup &amp; usage</h2>
<p>You can import the default flavor of <strong>mini.css</strong> in your webpage by simply adding the following reference inside your HTML page's <code>&lt;head&gt;</code> tag:</p>
<pre>&lt;<span class="fore-tertiary">link</span> <span class="fore-secondary">rel</span>=<span class="fore-primary">&quot;stylesheet&quot;</span> <span class="fore-secondary">href</span>=<span class="fore-primary">&quot;https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css&quot;</span>&gt;</pre><br>
<p>If you want to download the package using your favorite package manager, you can use either <strong>Bower</strong> or <strong>NPM</strong>:</p>
<div class="row">
<div class="col-sm-12 col-md-6"><pre><span class="fore-tertiary">bower install</span> <span class="fore-primary">mini.css</span></pre></div>
<div class="col-sm-12 col-md-6"><pre><span class="fore-tertiary">npm install</span> <span class="fore-primary">mini.css</span></pre></div>
</div><br>
<p>If you are interested in tinkering with the flavor files and cooking your own flavor, check out the <a href="customization.html">Customization</a> page for information, tips on how to get started and general guidelines.</p><br><hr>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<h2>Quick overview</h2>
<p>Take a couple of minutes to learn how <strong>mini.css</strong> differs from all those other UI frameworks (Bootstrap, Semantic UI etc):</p>
<table> <caption>Framework file size comparison</caption>
<thead> <tr> <th>Name</th><th>Version</th><th>Size (uncompressed)</th><th>Size (minified)</th><th>Size (gzipped)</th> </tr> </thead>
<tbody>
<tr>
<td data-label="Name">Bootstrap</td>
<td data-label="Version"><a href="https://github.com/twbs/bootstrap/blob/0b9c4a4007c44201dce9a6cc1a38407005c26c86/dist/css/bootstrap.css">v3.3.7</a></td>
<td data-label="Size (uncompressed)">143 KB</td><td data-label="Size (minified)">117 KB</td><td data-label="Size (gzipped)">20 KB</td>
</tr>
<tr>
<td data-label="Name">Material Framework</td>
<td data-label="Version"><a href="https://github.com/nt1m/material-framework/blob/c5f7fed174686118dded31aecca311d4cc9d8b07/css/material.css">v3.0</a></td>
<td data-label="Size (uncompressed)">114 KB</td><td data-label="Size (minified)">90 KB</td><td data-label="Size (gzipped)">18 KB</td>
</tr>
<tr>
<td data-label="Name">mini.css</td>
<td data-label="Version"><a href="https://github.com/chalarangelo/mini.css/blob/v2.1.0/dist/css/mini-default.css">v2.1</a></td>
<td data-label="Size (uncompressed)">47 KB</td><td data-label="Size (minified)">36 KB</td><td data-label="Size (gzipped)">7 KB</td>
</tr>
<tr>
<td data-label="Name">Semantic UI</td>
<td data-label="Version"><a href="https://github.com/Semantic-Org/Semantic-UI/blob/0b1b59b0e1c780e842820df5c1904a162034812c/dist/semantic.css">v2.2.6</a></td>
<td data-label="Size (uncompressed)">730 KB</td><td data-label="Size (minified)">550 KB</td><td data-label="Size (gzipped)">95 KB</td>
</tr>
<tr>
<td data-label="Name">Zurb Foundation</td>
<td data-label="Version"><a href="https://github.com/zurb/foundation-sites/blob/ab172838d6de406204956015c9fd393c5a526e0e/dist/foundation.css">v3.0</a></td>
<td data-label="Size (uncompressed)">90 KB</td><td data-label="Size (minified)">64 KB</td><td data-label="Size (gzipped)">12 KB</td>
</tr>
</tbody>
</table><br>
<p><mark class="secondary" style="padding: 3px 6px;"><i class="fa fa-lg fa-exclamation" aria-hidden="true"></i></mark>&nbsp;The above comparison takes into account only the CSS files of each framework. <strong>mini.css</strong>'s size is an approximation due to the nature of its flavor system. The calculated results were produced using <a href="http://refresh-sf.com/">Refresh-SF</a>.</p><br>
</div>
<div class="col-sm-12 col-md col-lg-5 col-lg-offset-1">
<h3>Module list</h3>
<ul>
<li><strong>Core</strong> - Resets, typography rules and fixes</li>
<li><strong>Grid</strong> - Powerful, responsive flexbox-based grid</li>
<li><strong>Navigation</strong> - Common elements for navigation</li>
<li><strong>Input Control</strong> - Forms, buttons and inputs</li>
<li><strong>Table</strong> - Modern, responsive tables</li>
<li><strong>Card</strong> - Sleek, modern content containers</li>
<li><strong>Tab</strong> - Responsive tabs and accordions</li>
<li><strong>Contextual</strong> - Contextual highlights and alerts</li>
<li><strong>Progress</strong> - Modern progress bars and loaders</li>
<li><strong>Utility</strong> - Utility and helper classes</li>
</ul>
</div>
<div class="col-sm-12 col-md col-lg-5">
<h3>Why does <strong>mini.css</strong> have so few modules?</h3>
<p>Modules are what make frameworks so powerful, by giving developers the essential components they need to structure and style their websites. <strong>mini.css</strong> simplifies the crafting and learning process for new developers by providing a handful of very powerful modules that can do many different things. This way, new developers will only have to learn a few different HTML structures and patterns, while having the ability to build a lot of interesting things with them. For example, cards can be used for almost any type of layout and can be customized to behave exactly as the developer needs them to. Tabs, on the other hand, are very responsive on mobile, collapsing to a stack below a certain width, but they can also be forced into a stack, allowing accordions and collapses to be built using the same building block as tabs.</p>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<table> <caption>Browser support</caption>
<thead> <tr> <th>Browser</th><th>Not supported</th><th>Partially supported</th><th>Fully supported</th> </tr> </thead>
<tbody>
<tr>
<td data-label="Browser"><i class="fa fa-internet-explorer" aria-hidden="true" style="color: #1565c0;"></i>&nbsp;Internet Explorer</td>
<td data-label="Not supported">8-</td><td data-label="Partially supported">9-10</td><td data-label="Fully supported">11+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-edge" aria-hidden="true" style="color: #0d47a1;"></i>&nbsp;Edge</td>
<td data-label="Not supported">n/a</td><td data-label="Partially supported">n/a</td><td data-label="Fully supported">12+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-firefox" aria-hidden="true" style="color: #bf360c;"></i>&nbsp;Firefox</td>
<td data-label="Not supported">21-</td><td data-label="Partially supported">22-27</td><td data-label="Fully supported">28+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-chrome" aria-hidden="true" style="color: #ff8f00;"></i>&nbsp;Chrome</td>
<td data-label="Not supported">20-</td><td data-label="Partially supported">n/a</td><td data-label="Fully supported">21+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-safari" aria-hidden="true" style="color: #0277bd;"></i>&nbsp;Safari</td>
<td data-label="Not supported">6-</td><td data-label="Partially supported">n/a</td><td data-label="Fully supported">6.1+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-opera" aria-hidden="true" style="color: #b71c1c;"></i>&nbsp;Opera</td>
<td data-label="Not supported">11.5-</td><td data-label="Partially supported">12.1-16</td><td data-label="Fully supported">17+</td>
</tr>
<tr>
<td data-label="Browser"><i class="fa fa-android" aria-hidden="true" style="color: #827717;"></i>&nbsp;Android Browser</td>
<td data-label="Not supported">4.3-</td><td data-label="Partially supported">n/a</td><td data-label="Fully supported">4.4+</td>
</tr>
</tbody>
</table><br>
<p><mark class="secondary" style="padding: 3px 6px;"><i class="fa fa-lg fa-exclamation" aria-hidden="true"></i></mark>&nbsp;Due to the way <strong>mini.css</strong> is crafted, some legacy browsers are not supported anymore and some others are partially supported. This could be a dealbreaker for some developers, however most legacy browsers will display a less feature-rich and modern website. Apart from the table above, note that some mobile browsers like Opera Mini, IE Mobile and UC Browser for Android are officially supported, but some features may not be displayed properly or behave as expected due to the browsers themselves.</p><br><hr>
</div>
</div>
<div class="row" style="padding-bottom: 60px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h2>Getting started</h2>
<p>If you are still here after reading this far, we will assume you are interested or at least curious. Based on that assumption, here are a few links to help get you started:</p>
<ul>
<li>For a quick guide on getting started, you might wanna take a look at the available <a href="modules.html">modules</a> list and the tutorials provided for each one!</li>
<li>If you are familiar with <strong>mini.css</strong> and want a cheat sheet or quick reference guide, check the <a href="quick_reference.html">quick reference</a> page!</li>
<li><strong>mini.css</strong> comes with a few nice pre-built customizable <a href="flavors.html">flavors</a>. See which one of them better suits your needs!</li>
<li>If you are more experienced or demanding, you can always take a look at the <a href="customization.html">customization</a> section to cook up a flavor of your own custom-tailored to your needs!</li>
</ul>
</div>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

View file

@ -1,458 +1,458 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Input Control</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, input, control, form, button ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-lg-4.col-lg-normal { box-sizing: border-box; border-right: 1px solid #bdbdbd;}
@media (max-width: 767px){.col-sm-12.col-sm-last.col-lg-4.col-lg-normal {border: 0;border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
.responsive-label {align-items: center;} @media (min-width: 768px) { .responsive-label .col-md-3 {text-align: right;}}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Input Control</h1>
<p>The <strong>input_control</strong> module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements' styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Input Control</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>The presentation of forms, input fields, buttons and other interactive elements is always very important for any website or app. The <strong>input_control</strong> module provides you with much needed styling improvements for all of these elements, while keeping everything simple to use and understand, as well as combine with the other modules. Forms and input elements have a clean, modern design, while some elements like checkoxes and radio buttons get a much needed facelift. Buttons have also been stylized to look the same in all browsers, while keeping their design clean and allowing for a few color and size variants. Grouping inputs and labels or buttons is also part of this module and, as always, responsiveness is an important feature. Finally, all of the components are accessible, with a few minor caveats, that are discussed in their respective section in this page.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>input_control</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Forms &amp; input</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<form>
<fieldset>
<legend>Inline form (default style)</legend>
<div class="input-group"><label for="username">username</label> <input type="email" value="" id="username" placeholder="username">&nbsp;</div>
<div class="input-group"><label for="pwd">password</label> <input type="password" value="" id="pwd" placeholder="password"></div>
</fieldset>
</form>
<form>
<fieldset>
<legend>Fluid form</legend>
<div class="input-group fluid"><label for="username">username</label> <input type="email" value="" id="username" placeholder="username"></div>
<div class="input-group fluid"><label for="pwd">password</label> <input type="password" value="" id="pwd" placeholder="password"></div>
</fieldset>
</form>
<form>
<fieldset>
<legend>Aligned form (using grid)</legend>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="number">Number</label>
</div>
<div class="col-sm-12 col-md">
<input type="number" value="4" id="number" style="width:85%;">
</div>
</div>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="disabled">Disabled</label>
</div>
<div class="col-sm-12 col-md">
<input disabled value="disabled" id="disabled" style="width:85%;">
</div>
</div>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="readonly">Readonly</label>
</div>
<div class="col-sm-12 col-md">
<input readonly value="readonly" id="readonly" style="width:85%;">
</div>
</div>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="select">Select</label>
</div>
<div class="col-sm-12 col-md">
<select id="select"> <option>Apples</option> <option>Oranges</option> </select>
</div>
</div>
</fieldset>
</form>
</div>
<div class="col-sm-12 col-sm-first col-lg-8 col-lg-normal">
<p>Forms are structured the same way you would structure a normal form in HTML5. Simply create a root <code>&lt;form&gt;</code> element and add your <code>&lt;input&gt;</code> elements inside. Link them to <code>&lt;label&gt;</code> elements for ease of acces and you are pretty much set. We highly recommend using the <code>&lt;fieldset&gt;</code> and <code>&lt;legend&gt;</code> elements to annotate your forms as well, but you can skip them if you wish.</p>
<p>Forms are inline by default. Use the <code>.input-group</code> class on a <code>&lt;div&gt;</code> wrapping inside it an <code>&lt;input&gt;</code> and <code>&lt;label&gt;</code> pair to make sure they always display together in one line. You can make your <code>.input-group</code>s respond to viewport changes, by adding the <code>.fluid</code> class to them. Finally, if you want to create aligned forms with a preset layout, you can utilize the <a href="grid.html"><strong>grid</strong></a> module's rows and columns.</p>
<h3>Sample code</h3>
<pre>&lt;form&gt;
&lt;fieldset&gt;
&lt;legend&gt;Simple form&lt;/legend&gt;
&lt;div class=&quot;input-group fluid&quot;&gt;
&lt;label for=&quot;username&quot;&gt;username&lt;/label&gt;
&lt;input type=&quot;email&quot; value=&quot;&quot; id=&quot;username&quot; placeholder=&quot;username&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;input-group fluid&quot;&gt;
&lt;label for=&quot;pwd&quot;&gt;password&lt;/label&gt;
&lt;input type=&quot;password&quot; value=&quot;&quot; id=&quot;pwd&quot; placeholder=&quot;password&quot;&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;/form&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Using the <code>&lt;fieldset&gt;</code> and <code>&lt;legend&gt;</code> elements is highly recommended for a better presentational effect. Using these elements is a matter of personal preference, however try to keep your forms consistent (i.e. either use them in all forms or no forms as to not confuse users).</li>
<li>Some <code>&lt;input&gt;</code> elements, such as date &amp; time, color and range types, are not supported and, as a result, do not have a default style defined for them. You can define said styles manually if you need to use them in your website or app.</li>
<li>Checkboxes and radio buttons are not stylized the same way as most of the other elements, nor do they follow the exact same stucture for layout. Please refer to the next section for information on how to use those.</li>
<li>Try not to combine the <strong>grid</strong> module's classes with <code>.fluid</code><code>.input-group</code>s, as this might cause certain styles to overlap and not display exactly like you want them to.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;form&gt;
&lt;fieldset&gt;
&lt;legend&gt;Responsive form&lt;/legend&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-4&quot;&gt;
&lt;label for=&quot;username&quot;&gt;username&lt;/label&gt;
&lt;/div&gt;
&lt;div class=&quot;col-sm-12 col-md&quot;&gt;
&lt;input type=&quot;email&quot; value=&quot;&quot; id=&quot;username&quot; placeholder=&quot;username&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-4&quot;&gt;
&lt;label for=&quot;pwd&quot;&gt;password&lt;/label&gt;
&lt;/div&gt;
&lt;div class=&quot;col-sm-12 col-md-4&quot;&gt;
&lt;input type=&quot;password&quot; value=&quot;&quot; id=&quot;pwd&quot; placeholder=&quot;password&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;/form&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use <code>.row</code> and <code>.col-<span class="fore-primary">SCR_SZ</span></code> or <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> (replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the column) to set specific layouts for your aligned forms. You can also use the same column classes to make them responsive for different screen sizes.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;form&gt;
&lt;fieldset&gt;
&lt;legend&gt;Responsive form&lt;/legend&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-10 col-md-offset-1&quot;&gt;
&lt;label for=&quot;username&quot;&gt;username&lt;/label&gt;
&lt;input type=&quot;email&quot; value=&quot;&quot; id=&quot;username&quot; placeholder=&quot;username&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-10 col-md-offset-1&quot;&gt;
&lt;label for=&quot;pwd&quot;&gt;password&lt;/label&gt;
&lt;input type=&quot;password&quot; value=&quot;&quot; id=&quot;pwd&quot; placeholder=&quot;password&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;/form&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;Apart from using <code>.row</code> and <code>.col-<span class="fore-primary">SCR_SZ</span></code> or <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> for responsiveness, you can also use other classes from the <strong>grid</strong> module such as the offset classes to make your form layouts more interesting.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;style&gt;
.label-aligned {
align-items: center;
}
&lt;/style&gt;
&lt;form&gt;
&lt;fieldset&gt;
&lt;legend&gt;Responsive form&lt;/legend&gt;
&lt;div class=&quot;row label-aligned&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-4&quot;&gt;
&lt;label for=&quot;username&quot;&gt;username&lt;/label&gt;
&lt;/div&gt;
&lt;div class=&quot;col-sm-12 col-md&quot;&gt;
&lt;input type=&quot;email&quot; value=&quot;&quot; id=&quot;username&quot; placeholder=&quot;username&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;/form&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;When creating aligned forms using the <strong>grid</strong> module's classes, labels might be off-center vertically compared to their inline counterparts. Use a simple styling for their parent <code>.row</code> element, if you want to adjust their vertical alignment.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre><&lt;form&gt;
&lt;fieldset&gt;
&lt;legend&gt;Responsive form&lt;/legend&gt;
&lt;div class=&quot;row input-group&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-4&quot;&gt;
&lt;label for=&quot;username&quot;&gt;username&lt;/label&gt;
&lt;/div&gt;
&lt;div class=&quot;col-sm-12 col-md&quot;&gt;
&lt;input type=&quot;email&quot; value=&quot;&quot; id=&quot;username&quot; placeholder=&quot;username&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;/form&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using the <code>.input-group</code> class when creating aligned forms. This might cause unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Checkboxes &amp; radio buttons</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<div class="box-centered">
<br>
<div class="input-group">
<input type="checkbox" id="chk1" tabindex="0" autocomplete="off"> <label for="chk1">&nbsp;Checkbox</label>
</div>
<br><br>
<div class="input-group">
<input type="radio" name="radios" value="r1" id="r1" tabindex="0" autocomplete="off" checked> <label for="r1">&nbsp;Value 1</label>&nbsp;&nbsp;<br>
<input type="radio" name="radios" value="r2" id="r2" tabindex="0" autocomplete="off"> <label for="r2">&nbsp;Value 2</label>&nbsp;&nbsp;<br>
<input type="radio" name="radios" value="r3" id="r3" tabindex="0" autocomplete="off"> <label for="r3">&nbsp;Value 3</label>&nbsp;&nbsp;<br>
</div>
<br><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-lg-8 col-lg-normal">
<p>Checkboxes and radio buttons come pre-styled, using the <a href="https://css-tricks.com/the-checkbox-hack/">checkbox hack</a>, while remaining fully accessible. To create a checkbox or radio button, start using a <code>&lt;div&gt;</code> that implements the <code>.input-group</code> class, and then add an <code>&lt;input&gt;</code> of the proper <code><span class="secondary">type</span></code> inside it (<code><span class="fore-primary">&quot;checkbox&quot;</span></code> or <code><span class="fore-primary">&quot;radio&quot;</span></code>), followed immediately by a <code>&lt;label&gt;</code> linking to it. Remember to add <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">&quot;0&quot;</span></code> to your <code>&lt;input&gt;</code>, so that it will register properly for screen readers.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;check1&quot; tabindex=&quot;0&quot;&gt;
&lt;label for=&quot;check1&quot;&gt;Checkbox&lt;/label&gt;
&lt;/div&gt;
&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;radio&quot; id=&quot;rad1&quot; tabindex=&quot;0&quot; name=&quot;radio-group-1&quot;&gt;
&lt;label for=&quot;rad1&quot;&gt;Radio&lt;/label&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Checkboxes and radio buttons are fully accessible. However, if not provided with a label, they are not visible to users, but only to screen readers.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-4">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;radio&quot; id=&quot;rad1&quot; tabindex=&quot;0&quot; name=&quot;radio-group-1&quot;&gt;
&lt;label for=&quot;rad1&quot;&gt;Value 1&lt;/label&gt;
&lt;input type=&quot;radio&quot; id=&quot;rad2&quot; tabindex=&quot;0&quot; name=&quot;radio-group-1&quot;&gt;
&lt;label for=&quot;rad2&quot;&gt;Value 2&lt;/label&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can add multiple <code>radio</code> buttons inside one <code>.input-group</code>, as long as they follow the syntax shown above. In fact, we strongly recommend grouping controls that are relevant to each other in this manner.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;input type=&quot;checkbox&quot; id=&quot;check1&quot; tabindex=&quot;0&quot;&gt;
&lt;label for=&quot;check1&quot;&gt;Checkbox&lt;/label&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Always use an <code>.input-group</code> for your checkboxes and radio buttons. Not doing so will cause the checkbox or radio button to not display properly.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;check1&quot;
&lt;label for=&quot;check1&quot;&gt;Checkbox&lt;/label&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Remember to add <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">&quot;0&quot;</span></code> to all your checkboxes and radio buttons to make them accessible.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;label for=&quot;check1&quot;&gt;Checkbox&lt;/label&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;check1&quot; tabindex=&quot;0&quot;&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;The structure of checkboxes and radio buttons is very strict, meaning that the <code>&lt;label&gt;</code> should always be after the <code>&lt;input&gt;</code> and never before, otherwise the checkbox or radio button will not display properly.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;radio&quot; id=&quot;rad1&quot; tabindex=&quot;0&quot; name=&quot;radio-group-1&quot;&gt;
&lt;input type=&quot;radio&quot; id=&quot;rad2&quot; tabindex=&quot;0&quot; name=&quot;radio-group-1&quot;&gt;
&lt;label for=&quot;rad2&quot;&gt;Value 2&lt;/label&gt;
&lt;label for=&quot;rad1&quot;&gt;Value 1&lt;/label&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;When using multiple radio buttons inside an <code>.input-group</code>, remember to use the usual structure of the radio button component for each radio button (i.e. the <code>&lt;input&gt;</code> and <code>&lt;label&gt;</code>). Not doing so will cause the radio buttons to not display properly.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;check1&quot; tabindex=&quot;0&quot;&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Never leave a checkbox or radio button without a <code>&lt;label&gt;</code>. The <code>&lt;label&gt;</code> is essential to properly display the checkbox or radio button.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Buttons &amp; button groups</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<button>Default button</button>
<button class="primary">Primary button</button>
<button class="secondary">Secondary button</button>
<button class="tertiary">Tertiary button</button>
<button class="inverse">Inverse button</button>
<button class="small">Small button</button>
<button class="large">Large button</button>
<button disabled>Disabled button</button>
<h4>Button group</h4>
<div class="button-group"> <button>Button</button> <button>Button</button> <button>Button</button> </div>
</div>
<div class="col-sm-12 col-sm-first col-lg-8 col-lg-normal">
<p>All button types have been stylized by default, while maintaining accessiblity. Simply add any <code>&lt;button&gt;</code> or an <code>&lt;input&gt;</code> with a button <code><span class="secondary">type</span></code> (i.e. <code><span class="fore-primary">&quot;button&quot;</span></code>, <code><span class="fore-primary">&quot;submit&quot;</span></code> or <code><span class="fore-primary">&quot;reset&quot;</span></code>) and they will be styled accordingly. You can also use the <code>.button</code> class or the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>&quot;</span></code> attribute for links, labels and other elements of your choice to make them look like buttons.</p>
<p>Color variants are available in the form of the <code>.primary</code>, <code>.secondary</code>, <code>.tertiary</code> and <code>.inverse</code> classes. Size variants are available as well in the form of <code>.small</code> and <code>.large</code> classes.</p>
<p>Finally, you can create responsive groups of buttons by wrapping them inside a <code>&lt;div&gt;</code> with the <code>.button-group</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;button&gt;Default button&lt;/button&gt;
&lt;input type=&quot;button&quot; class=&quot;primary&quot; value=&quot;Primary button&quot;&gt;
&lt;input type=&quot;reset&quot; class=&quot;secondary&quot; value=&quot;Secondary button&quot;&gt;
&lt;input type=&quot;submit&quot; class=&quot;tertiary&quot; value=&quot;Tertiary button&quot;&gt;
&lt;button class=&quot;inverse&quot;&gt;Inverse button&lt;/button&gt;
&lt;button class=&quot;small&quot;&gt;Small button&lt;/button&gt;
&lt;button class=&quot;large&quot;&gt;Large button&lt;/button&gt;
&lt;button disabled&gt;Disabled button&lt;/button&gt;
&lt;a href=&quot;#&quot; class=&quot;button&quot;&gt;Link button&lt;/a&gt;
&lt;a href=&quot;#&quot; role=&quot;button&quot;&gt;Link button&lt;/a&gt;
&lt;label class=&quot;button&quot;&gt;Label button&lt;/label&gt;
&lt;label role=&quot;button&quot;&gt;Label button&lt;/label&gt;
&lt;div class=&quot;button-group&quot;&gt;
&lt;button&gt;Button&lt;/button&gt;
&lt;button&gt;Button&lt;/button&gt;
&lt;button&gt;Button&lt;/button&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>If you want more color or size variants for your buttons, check out the <a href="customization.html">customization</a> page.</li>
<li>The <code>.button-group</code> component is compatible with modern browsers, but might not display properly in older browsers.</li>
<li><code>.button-group</code>s will display as a horizontal container with all their buttons in one row on medium-sized and larger displays, however they will collapse into a column view for smaller displays.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;button class=&quot;inverse small&quot;&gt;Small inverse button&lt;/button&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can mix and match button color and size variants to achieve the desired effect.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;button class=&quot;secondary inverse&quot;&gt;Problematic button&lt;/button&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;button class=&quot;small large&quot;&gt;Problematic button&lt;/button&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid mixing two or more button color or size variants, as these combinations might result in unexpected behavior.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;div class=&quot;button-group&quot;&gt;
&lt;button&gt;Button&lt;/button&gt;
&lt;input type=&quot;reset&quot; class=&quot;secondary&quot; value=&quot;Secondary button&quot;&gt;
&lt;label class=&quot;button inverse&quot;&gt;Label button&lt;/label&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use button color variants inside the same <code>.button-group</code>. You can also use any component styled like a button inside a <code>.button-group</code>.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;button-group&quot;&gt;
&lt;button class=&quot;large&quot;&gt;Button&lt;/button&gt;
&lt;button&gt;Button&lt;/button&gt;
&lt;button class=&quot;small&quot;&gt;Button&lt;/button&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using button size variants inside a <code>.button-group</code>, as this might result in unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>File upload buttons</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<div class="input-group">
<br>
<input type="file" id="file-input-demo">
<label for="file-input-demo" class="button"><i class="fa fa-upload" aria-hidden="true"></i>&nbsp;Upload file</label>
<br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-lg-8 col-lg-normal">
<p>File upload buttons are commonly a sore spot in CSS frameworks. We try to remedy this problem by hiding the <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">&quot;file&quot;</span>&gt;</code>, while maintaining accessiblity and using a linked <code>&lt;label&gt;</code> of the <code>.button</code> class to display it in a modern way.</p>
<h3>Sample code</h3>
<pre>&lt;input type=&quot;file&quot; id=&quot;file-input&quot;&gt;
&lt;label for=&quot;file-input&quot; class=&quot;button&quot;&gt;Upload file...&lt;/label&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The icon displayed in the example above is not part of the button styling.</li>
<li>File upload buttons do not change their text to the name of the file after the user has selected a file to upload. You can, however, add this functionality using a few lines of Javascript.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;file&quot; id=&quot;file-input&quot;&gt;
&lt;label for=&quot;file-input&quot; class=&quot;button&quot;&gt;Upload file...&lt;/label&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use an <code>.input-group</code> to wrap the file upload <code>&lt;input&gt;</code> and its linked <code>&lt;label&gt;</code>, if you wish.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Input Control</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, input, control, form, button ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-lg-4.col-lg-normal { box-sizing: border-box; border-right: 1px solid #bdbdbd;}
@media (max-width: 767px){.col-sm-12.col-sm-last.col-lg-4.col-lg-normal {border: 0;border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
.responsive-label {align-items: center;} @media (min-width: 768px) { .responsive-label .col-md-3 {text-align: right;}}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Input Control</h1>
<p>The <strong>input_control</strong> module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements' styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Input Control</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>The presentation of forms, input fields, buttons and other interactive elements is always very important for any website or app. The <strong>input_control</strong> module provides you with much needed styling improvements for all of these elements, while keeping everything simple to use and understand, as well as combine with the other modules. Forms and input elements have a clean, modern design, while some elements like checkoxes and radio buttons get a much needed facelift. Buttons have also been stylized to look the same in all browsers, while keeping their design clean and allowing for a few color and size variants. Grouping inputs and labels or buttons is also part of this module and, as always, responsiveness is an important feature. Finally, all of the components are accessible, with a few minor caveats, that are discussed in their respective section in this page.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>input_control</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Forms &amp; input</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<form>
<fieldset>
<legend>Inline form (default style)</legend>
<div class="input-group"><label for="username">username</label> <input type="email" value="" id="username" placeholder="username">&nbsp;</div>
<div class="input-group"><label for="pwd">password</label> <input type="password" value="" id="pwd" placeholder="password"></div>
</fieldset>
</form>
<form>
<fieldset>
<legend>Fluid form</legend>
<div class="input-group fluid"><label for="username">username</label> <input type="email" value="" id="username" placeholder="username"></div>
<div class="input-group fluid"><label for="pwd">password</label> <input type="password" value="" id="pwd" placeholder="password"></div>
</fieldset>
</form>
<form>
<fieldset>
<legend>Aligned form (using grid)</legend>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="number">Number</label>
</div>
<div class="col-sm-12 col-md">
<input type="number" value="4" id="number" style="width:85%;">
</div>
</div>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="disabled">Disabled</label>
</div>
<div class="col-sm-12 col-md">
<input disabled value="disabled" id="disabled" style="width:85%;">
</div>
</div>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="readonly">Readonly</label>
</div>
<div class="col-sm-12 col-md">
<input readonly value="readonly" id="readonly" style="width:85%;">
</div>
</div>
<div class="row responsive-label">
<div class="col-sm-12 col-md-3">
<label for="select">Select</label>
</div>
<div class="col-sm-12 col-md">
<select id="select"> <option>Apples</option> <option>Oranges</option> </select>
</div>
</div>
</fieldset>
</form>
</div>
<div class="col-sm-12 col-sm-first col-lg-8 col-lg-normal">
<p>Forms are structured the same way you would structure a normal form in HTML5. Simply create a root <code>&lt;form&gt;</code> element and add your <code>&lt;input&gt;</code> elements inside. Link them to <code>&lt;label&gt;</code> elements for ease of acces and you are pretty much set. We highly recommend using the <code>&lt;fieldset&gt;</code> and <code>&lt;legend&gt;</code> elements to annotate your forms as well, but you can skip them if you wish.</p>
<p>Forms are inline by default. Use the <code>.input-group</code> class on a <code>&lt;div&gt;</code> wrapping inside it an <code>&lt;input&gt;</code> and <code>&lt;label&gt;</code> pair to make sure they always display together in one line. You can make your <code>.input-group</code>s respond to viewport changes, by adding the <code>.fluid</code> class to them. Finally, if you want to create aligned forms with a preset layout, you can utilize the <a href="grid.html"><strong>grid</strong></a> module's rows and columns.</p>
<h3>Sample code</h3>
<pre>&lt;form&gt;
&lt;fieldset&gt;
&lt;legend&gt;Simple form&lt;/legend&gt;
&lt;div class=&quot;input-group fluid&quot;&gt;
&lt;label for=&quot;username&quot;&gt;username&lt;/label&gt;
&lt;input type=&quot;email&quot; value=&quot;&quot; id=&quot;username&quot; placeholder=&quot;username&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;input-group fluid&quot;&gt;
&lt;label for=&quot;pwd&quot;&gt;password&lt;/label&gt;
&lt;input type=&quot;password&quot; value=&quot;&quot; id=&quot;pwd&quot; placeholder=&quot;password&quot;&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;/form&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Using the <code>&lt;fieldset&gt;</code> and <code>&lt;legend&gt;</code> elements is highly recommended for a better presentational effect. Using these elements is a matter of personal preference, however try to keep your forms consistent (i.e. either use them in all forms or no forms as to not confuse users).</li>
<li>Some <code>&lt;input&gt;</code> elements, such as date &amp; time, color and range types, are not supported and, as a result, do not have a default style defined for them. You can define said styles manually if you need to use them in your website or app.</li>
<li>Checkboxes and radio buttons are not stylized the same way as most of the other elements, nor do they follow the exact same stucture for layout. Please refer to the next section for information on how to use those.</li>
<li>Try not to combine the <strong>grid</strong> module's classes with <code>.fluid</code><code>.input-group</code>s, as this might cause certain styles to overlap and not display exactly like you want them to.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;form&gt;
&lt;fieldset&gt;
&lt;legend&gt;Responsive form&lt;/legend&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-4&quot;&gt;
&lt;label for=&quot;username&quot;&gt;username&lt;/label&gt;
&lt;/div&gt;
&lt;div class=&quot;col-sm-12 col-md&quot;&gt;
&lt;input type=&quot;email&quot; value=&quot;&quot; id=&quot;username&quot; placeholder=&quot;username&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-4&quot;&gt;
&lt;label for=&quot;pwd&quot;&gt;password&lt;/label&gt;
&lt;/div&gt;
&lt;div class=&quot;col-sm-12 col-md-4&quot;&gt;
&lt;input type=&quot;password&quot; value=&quot;&quot; id=&quot;pwd&quot; placeholder=&quot;password&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;/form&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use <code>.row</code> and <code>.col-<span class="fore-primary">SCR_SZ</span></code> or <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> (replacing <code><span class="fore-primary">SCR_SZ</span></code> with one of the available screen size names (<code><span class="fore-tertiary">sm</span></code> for smaller screens, <code><span class="fore-tertiary">md</span></code> for medium-sized screens or <code><span class="fore-tertiary">lg</span></code> for larger screens and <code><span class="fore-secondary">COL_WD</span></code> with a number from <code>1</code> to <code>12</code> specifying the width of the column) to set specific layouts for your aligned forms. You can also use the same column classes to make them responsive for different screen sizes.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;form&gt;
&lt;fieldset&gt;
&lt;legend&gt;Responsive form&lt;/legend&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-10 col-md-offset-1&quot;&gt;
&lt;label for=&quot;username&quot;&gt;username&lt;/label&gt;
&lt;input type=&quot;email&quot; value=&quot;&quot; id=&quot;username&quot; placeholder=&quot;username&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-10 col-md-offset-1&quot;&gt;
&lt;label for=&quot;pwd&quot;&gt;password&lt;/label&gt;
&lt;input type=&quot;password&quot; value=&quot;&quot; id=&quot;pwd&quot; placeholder=&quot;password&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;/form&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;Apart from using <code>.row</code> and <code>.col-<span class="fore-primary">SCR_SZ</span></code> or <code>.col-<span class="fore-primary">SCR_SZ</span>-<span class="fore-secondary">COL_WD</span></code> for responsiveness, you can also use other classes from the <strong>grid</strong> module such as the offset classes to make your form layouts more interesting.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;style&gt;
.label-aligned {
align-items: center;
}
&lt;/style&gt;
&lt;form&gt;
&lt;fieldset&gt;
&lt;legend&gt;Responsive form&lt;/legend&gt;
&lt;div class=&quot;row label-aligned&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-4&quot;&gt;
&lt;label for=&quot;username&quot;&gt;username&lt;/label&gt;
&lt;/div&gt;
&lt;div class=&quot;col-sm-12 col-md&quot;&gt;
&lt;input type=&quot;email&quot; value=&quot;&quot; id=&quot;username&quot; placeholder=&quot;username&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;/form&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;When creating aligned forms using the <strong>grid</strong> module's classes, labels might be off-center vertically compared to their inline counterparts. Use a simple styling for their parent <code>.row</code> element, if you want to adjust their vertical alignment.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre><&lt;form&gt;
&lt;fieldset&gt;
&lt;legend&gt;Responsive form&lt;/legend&gt;
&lt;div class=&quot;row input-group&quot;&gt;
&lt;div class=&quot;col-sm-12 col-md-4&quot;&gt;
&lt;label for=&quot;username&quot;&gt;username&lt;/label&gt;
&lt;/div&gt;
&lt;div class=&quot;col-sm-12 col-md&quot;&gt;
&lt;input type=&quot;email&quot; value=&quot;&quot; id=&quot;username&quot; placeholder=&quot;username&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/fieldset&gt;
&lt;/form&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using the <code>.input-group</code> class when creating aligned forms. This might cause unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Checkboxes &amp; radio buttons</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<div class="box-centered">
<br>
<div class="input-group">
<input type="checkbox" id="chk1" tabindex="0" autocomplete="off"> <label for="chk1">&nbsp;Checkbox</label>
</div>
<br><br>
<div class="input-group">
<input type="radio" name="radios" value="r1" id="r1" tabindex="0" autocomplete="off" checked> <label for="r1">&nbsp;Value 1</label>&nbsp;&nbsp;<br>
<input type="radio" name="radios" value="r2" id="r2" tabindex="0" autocomplete="off"> <label for="r2">&nbsp;Value 2</label>&nbsp;&nbsp;<br>
<input type="radio" name="radios" value="r3" id="r3" tabindex="0" autocomplete="off"> <label for="r3">&nbsp;Value 3</label>&nbsp;&nbsp;<br>
</div>
<br><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-lg-8 col-lg-normal">
<p>Checkboxes and radio buttons come pre-styled, using the <a href="https://css-tricks.com/the-checkbox-hack/">checkbox hack</a>, while remaining fully accessible. To create a checkbox or radio button, start using a <code>&lt;div&gt;</code> that implements the <code>.input-group</code> class, and then add an <code>&lt;input&gt;</code> of the proper <code><span class="secondary">type</span></code> inside it (<code><span class="fore-primary">&quot;checkbox&quot;</span></code> or <code><span class="fore-primary">&quot;radio&quot;</span></code>), followed immediately by a <code>&lt;label&gt;</code> linking to it. Remember to add <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">&quot;0&quot;</span></code> to your <code>&lt;input&gt;</code>, so that it will register properly for screen readers.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;check1&quot; tabindex=&quot;0&quot;&gt;
&lt;label for=&quot;check1&quot;&gt;Checkbox&lt;/label&gt;
&lt;/div&gt;
&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;radio&quot; id=&quot;rad1&quot; tabindex=&quot;0&quot; name=&quot;radio-group-1&quot;&gt;
&lt;label for=&quot;rad1&quot;&gt;Radio&lt;/label&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Checkboxes and radio buttons are fully accessible. However, if not provided with a label, they are not visible to users, but only to screen readers.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-4">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;radio&quot; id=&quot;rad1&quot; tabindex=&quot;0&quot; name=&quot;radio-group-1&quot;&gt;
&lt;label for=&quot;rad1&quot;&gt;Value 1&lt;/label&gt;
&lt;input type=&quot;radio&quot; id=&quot;rad2&quot; tabindex=&quot;0&quot; name=&quot;radio-group-1&quot;&gt;
&lt;label for=&quot;rad2&quot;&gt;Value 2&lt;/label&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can add multiple <code>radio</code> buttons inside one <code>.input-group</code>, as long as they follow the syntax shown above. In fact, we strongly recommend grouping controls that are relevant to each other in this manner.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;input type=&quot;checkbox&quot; id=&quot;check1&quot; tabindex=&quot;0&quot;&gt;
&lt;label for=&quot;check1&quot;&gt;Checkbox&lt;/label&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Always use an <code>.input-group</code> for your checkboxes and radio buttons. Not doing so will cause the checkbox or radio button to not display properly.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;check1&quot;
&lt;label for=&quot;check1&quot;&gt;Checkbox&lt;/label&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Remember to add <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">&quot;0&quot;</span></code> to all your checkboxes and radio buttons to make them accessible.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;label for=&quot;check1&quot;&gt;Checkbox&lt;/label&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;check1&quot; tabindex=&quot;0&quot;&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;The structure of checkboxes and radio buttons is very strict, meaning that the <code>&lt;label&gt;</code> should always be after the <code>&lt;input&gt;</code> and never before, otherwise the checkbox or radio button will not display properly.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;radio&quot; id=&quot;rad1&quot; tabindex=&quot;0&quot; name=&quot;radio-group-1&quot;&gt;
&lt;input type=&quot;radio&quot; id=&quot;rad2&quot; tabindex=&quot;0&quot; name=&quot;radio-group-1&quot;&gt;
&lt;label for=&quot;rad2&quot;&gt;Value 2&lt;/label&gt;
&lt;label for=&quot;rad1&quot;&gt;Value 1&lt;/label&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;When using multiple radio buttons inside an <code>.input-group</code>, remember to use the usual structure of the radio button component for each radio button (i.e. the <code>&lt;input&gt;</code> and <code>&lt;label&gt;</code>). Not doing so will cause the radio buttons to not display properly.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal col-lg-4 col-lg-last">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;check1&quot; tabindex=&quot;0&quot;&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Never leave a checkbox or radio button without a <code>&lt;label&gt;</code>. The <code>&lt;label&gt;</code> is essential to properly display the checkbox or radio button.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Buttons &amp; button groups</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<button>Default button</button>
<button class="primary">Primary button</button>
<button class="secondary">Secondary button</button>
<button class="tertiary">Tertiary button</button>
<button class="inverse">Inverse button</button>
<button class="small">Small button</button>
<button class="large">Large button</button>
<button disabled>Disabled button</button>
<h4>Button group</h4>
<div class="button-group"> <button>Button</button> <button>Button</button> <button>Button</button> </div>
</div>
<div class="col-sm-12 col-sm-first col-lg-8 col-lg-normal">
<p>All button types have been stylized by default, while maintaining accessiblity. Simply add any <code>&lt;button&gt;</code> or an <code>&lt;input&gt;</code> with a button <code><span class="secondary">type</span></code> (i.e. <code><span class="fore-primary">&quot;button&quot;</span></code>, <code><span class="fore-primary">&quot;submit&quot;</span></code> or <code><span class="fore-primary">&quot;reset&quot;</span></code>) and they will be styled accordingly. You can also use the <code>.button</code> class or the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>&quot;</span></code> attribute for links, labels and other elements of your choice to make them look like buttons.</p>
<p>Color variants are available in the form of the <code>.primary</code>, <code>.secondary</code>, <code>.tertiary</code> and <code>.inverse</code> classes. Size variants are available as well in the form of <code>.small</code> and <code>.large</code> classes.</p>
<p>Finally, you can create responsive groups of buttons by wrapping them inside a <code>&lt;div&gt;</code> with the <code>.button-group</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;button&gt;Default button&lt;/button&gt;
&lt;input type=&quot;button&quot; class=&quot;primary&quot; value=&quot;Primary button&quot;&gt;
&lt;input type=&quot;reset&quot; class=&quot;secondary&quot; value=&quot;Secondary button&quot;&gt;
&lt;input type=&quot;submit&quot; class=&quot;tertiary&quot; value=&quot;Tertiary button&quot;&gt;
&lt;button class=&quot;inverse&quot;&gt;Inverse button&lt;/button&gt;
&lt;button class=&quot;small&quot;&gt;Small button&lt;/button&gt;
&lt;button class=&quot;large&quot;&gt;Large button&lt;/button&gt;
&lt;button disabled&gt;Disabled button&lt;/button&gt;
&lt;a href=&quot;#&quot; class=&quot;button&quot;&gt;Link button&lt;/a&gt;
&lt;a href=&quot;#&quot; role=&quot;button&quot;&gt;Link button&lt;/a&gt;
&lt;label class=&quot;button&quot;&gt;Label button&lt;/label&gt;
&lt;label role=&quot;button&quot;&gt;Label button&lt;/label&gt;
&lt;div class=&quot;button-group&quot;&gt;
&lt;button&gt;Button&lt;/button&gt;
&lt;button&gt;Button&lt;/button&gt;
&lt;button&gt;Button&lt;/button&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>If you want more color or size variants for your buttons, check out the <a href="customization.html">customization</a> page.</li>
<li>The <code>.button-group</code> component is compatible with modern browsers, but might not display properly in older browsers.</li>
<li><code>.button-group</code>s will display as a horizontal container with all their buttons in one row on medium-sized and larger displays, however they will collapse into a column view for smaller displays.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;button class=&quot;inverse small&quot;&gt;Small inverse button&lt;/button&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can mix and match button color and size variants to achieve the desired effect.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;button class=&quot;secondary inverse&quot;&gt;Problematic button&lt;/button&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;button class=&quot;small large&quot;&gt;Problematic button&lt;/button&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid mixing two or more button color or size variants, as these combinations might result in unexpected behavior.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;div class=&quot;button-group&quot;&gt;
&lt;button&gt;Button&lt;/button&gt;
&lt;input type=&quot;reset&quot; class=&quot;secondary&quot; value=&quot;Secondary button&quot;&gt;
&lt;label class=&quot;button inverse&quot;&gt;Label button&lt;/label&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use button color variants inside the same <code>.button-group</code>. You can also use any component styled like a button inside a <code>.button-group</code>.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;button-group&quot;&gt;
&lt;button class=&quot;large&quot;&gt;Button&lt;/button&gt;
&lt;button&gt;Button&lt;/button&gt;
&lt;button class=&quot;small&quot;&gt;Button&lt;/button&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using button size variants inside a <code>.button-group</code>, as this might result in unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>File upload buttons</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<div class="input-group">
<br>
<input type="file" id="file-input-demo">
<label for="file-input-demo" class="button"><i class="fa fa-upload" aria-hidden="true"></i>&nbsp;Upload file</label>
<br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-lg-8 col-lg-normal">
<p>File upload buttons are commonly a sore spot in CSS frameworks. We try to remedy this problem by hiding the <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">&quot;file&quot;</span>&gt;</code>, while maintaining accessiblity and using a linked <code>&lt;label&gt;</code> of the <code>.button</code> class to display it in a modern way.</p>
<h3>Sample code</h3>
<pre>&lt;input type=&quot;file&quot; id=&quot;file-input&quot;&gt;
&lt;label for=&quot;file-input&quot; class=&quot;button&quot;&gt;Upload file...&lt;/label&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The icon displayed in the example above is not part of the button styling.</li>
<li>File upload buttons do not change their text to the name of the file after the user has selected a file to upload. You can, however, add this functionality using a few lines of Javascript.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12">
<pre>&lt;div class=&quot;input-group&quot;&gt;
&lt;input type=&quot;file&quot; id=&quot;file-input&quot;&gt;
&lt;label for=&quot;file-input&quot; class=&quot;button&quot;&gt;Upload file...&lt;/label&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use an <code>.input-group</code> to wrap the file upload <code>&lt;input&gt;</code> and its linked <code>&lt;label&gt;</code>, if you wish.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

View file

@ -1,123 +1,123 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Modules</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, modules">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; } .box-left { text-align: left; }
</style>
</head>
<body>
<header class="sticky">
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<h1>Modules</h1>
<p><strong>mini.css</strong> uses modules as its base building blocks. Each module contains one or more components that affect the same part of the user experience. Below you can see a quick overview of all the modules that compose <strong>mini.css</strong>.</p><br>
</div>
</div>
<div class="row box-centered">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1 row">
<div class="card fluid">
<h2 class="section"><mark class="primary"><i class="fa fa-font fa-fw" aria-hidden="true"></i></mark>&nbsp;Core</h2>
<p class="section box-left">The <strong>core</strong> module contains basic reset and fix rules, based on <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like.</p>
<a href="core.html" class="button section">See more</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 row">
<div class="card fluid">
<h2 class="section"><mark class="secondary"><i class="fa fa-th-large fa-fw" aria-hidden="true"></i></mark>&nbsp;Grid</h2>
<p class="section box-left">The <strong>grid</strong> module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as <em>flexbox</em>). The structure of the grid is simple and logical, allowing you to quickly build your pages from scratch. Setting the layout for a page is easy and will behave the way you want them to on mobile devices and smaller screens.</p>
<a href="grid.html" class="button section">See more</a>
</div>
</div>
</div>
<div class="row box-centered">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1 row">
<div class="card fluid">
<h2 class="section"><mark class="primary"><i class="fa fa-compass fa-fw" aria-hidden="true"></i></mark>&nbsp;Navigation</h2>
<p class="section box-left">The <strong>navigation</strong> module seeks to remedy the problems of vertical and horizontal navigation design paradigms, by combining the two for a better presentational effect. HTML5 navigational elements are at the heart of the module, allowing you to quickly build your navigation without complicated structures and hacks.</p>
<a href="navigation.html" class="button section">See more</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 row">
<div class="card fluid">
<h2 class="section"><mark class="tertiary"><i class="fa fa-keyboard-o fa-fw" aria-hidden="true"></i></mark>&nbsp;Input Control</h2>
<p class="section box-left">The <strong>input_control</strong> module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements's styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way.</p>
<a href="input_control.html" class="button section">See more</a>
</div>
</div>
</div>
<div class="row box-centered">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1 row">
<div class="card fluid">
<h2 class="section"><mark class="primary"><i class="fa fa-table fa-fw" aria-hidden="true"></i></mark>&nbsp;Table</h2>
<p class="section box-left">The <strong>table</strong> module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view.</p>
<a href="table.html" class="button section">See more</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 row">
<div class="card fluid">
<h2 class="section"><mark class="secondary"><i class="fa fa-id-card-o fa-fw" aria-hidden="true"></i></mark>&nbsp;Card</h2>
<p class="section box-left">The <strong>card</strong> module provides you with modern, responsive, general-purpose containers for your page's contents. They are very easy to use and their structure is really simple and versatile. Layouts will respond to smaller screens, realigning the cards in a manner that makes your page mobile-friendly.</p>
<a href="card.html" class="button section">See more</a>
</div>
</div>
</div>
<div class="row box-centered">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1 row">
<div class="card fluid">
<h2 class="section"><mark class="secondary"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i></mark>&nbsp;Tab</h2>
<p class="section box-left">The <strong>tab</strong> module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want.</p>
<a href="tab.html" class="button section">See more</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 row">
<div class="card fluid">
<h2 class="section"><mark class="secondary"><i class="fa fa-tags fa-fw" aria-hidden="true"></i></mark>&nbsp;Contextual</h2>
<p class="section box-left">The <strong>contextual</strong> module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. The contextual alerts aim to replace the commonly used modal dialog design paradigm with a more modern one. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily.</p>
<a href="contextual.html" class="button section">See more</a>
</div>
</div>
</div>
<div class="row box-centered" style="padding-bottom: 40px;">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1 row">
<div class="card fluid">
<h2 class="section"><mark class="tertiary"><i class="fa fa-spinner fa-fw" aria-hidden="true"></i></mark>&nbsp;Progress</h2>
<p class="section box-left">The <strong>progress</strong> module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading.</p>
<a href="progress.html" class="button section">See more</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 row">
<div class="card fluid">
<h2 class="section"><mark class="tertiary"><i class="fa fa-wrench fa-fw" aria-hidden="true"></i></mark>&nbsp;Utility</h2>
<p class="section box-left">The <strong>utility</strong> module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere.</p>
<a href="utility.html" class="button section">See more</a>
</div>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Modules</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, modules">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; } .box-left { text-align: left; }
</style>
</head>
<body>
<header class="sticky">
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
<h1>Modules</h1>
<p><strong>mini.css</strong> uses modules as its base building blocks. Each module contains one or more components that affect the same part of the user experience. Below you can see a quick overview of all the modules that compose <strong>mini.css</strong>.</p><br>
</div>
</div>
<div class="row box-centered">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1 row">
<div class="card fluid">
<h2 class="section"><mark class="primary"><i class="fa fa-font fa-fw" aria-hidden="true"></i></mark>&nbsp;Core</h2>
<p class="section box-left">The <strong>core</strong> module contains basic reset and fix rules, based on <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> v5.0.0, along with lots of custom typography rules. Most textual HTML5 elements are styled by this module, so you can start writing your pages immediately without worrying about font families, weights, sizes, line heights, paddings and the like.</p>
<a href="core.html" class="button section">See more</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 row">
<div class="card fluid">
<h2 class="section"><mark class="secondary"><i class="fa fa-th-large fa-fw" aria-hidden="true"></i></mark>&nbsp;Grid</h2>
<p class="section box-left">The <strong>grid</strong> module provides you with a modern, responsive grid system based on the Flexible Layout Module (commonly known as <em>flexbox</em>). The structure of the grid is simple and logical, allowing you to quickly build your pages from scratch. Setting the layout for a page is easy and will behave the way you want them to on mobile devices and smaller screens.</p>
<a href="grid.html" class="button section">See more</a>
</div>
</div>
</div>
<div class="row box-centered">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1 row">
<div class="card fluid">
<h2 class="section"><mark class="primary"><i class="fa fa-compass fa-fw" aria-hidden="true"></i></mark>&nbsp;Navigation</h2>
<p class="section box-left">The <strong>navigation</strong> module seeks to remedy the problems of vertical and horizontal navigation design paradigms, by combining the two for a better presentational effect. HTML5 navigational elements are at the heart of the module, allowing you to quickly build your navigation without complicated structures and hacks.</p>
<a href="navigation.html" class="button section">See more</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 row">
<div class="card fluid">
<h2 class="section"><mark class="tertiary"><i class="fa fa-keyboard-o fa-fw" aria-hidden="true"></i></mark>&nbsp;Input Control</h2>
<p class="section box-left">The <strong>input_control</strong> module contains rules that affect forms, input elements, buttons, checkboxes and radio buttons. All of these elements's styles are predefined, allowing you to create modern, responsive forms quickly. Layout alternatives are also provided if you want your forms to look a certain way.</p>
<a href="input_control.html" class="button section">See more</a>
</div>
</div>
</div>
<div class="row box-centered">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1 row">
<div class="card fluid">
<h2 class="section"><mark class="primary"><i class="fa fa-table fa-fw" aria-hidden="true"></i></mark>&nbsp;Table</h2>
<p class="section box-left">The <strong>table</strong> module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view.</p>
<a href="table.html" class="button section">See more</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 row">
<div class="card fluid">
<h2 class="section"><mark class="secondary"><i class="fa fa-id-card-o fa-fw" aria-hidden="true"></i></mark>&nbsp;Card</h2>
<p class="section box-left">The <strong>card</strong> module provides you with modern, responsive, general-purpose containers for your page's contents. They are very easy to use and their structure is really simple and versatile. Layouts will respond to smaller screens, realigning the cards in a manner that makes your page mobile-friendly.</p>
<a href="card.html" class="button section">See more</a>
</div>
</div>
</div>
<div class="row box-centered">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1 row">
<div class="card fluid">
<h2 class="section"><mark class="secondary"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i></mark>&nbsp;Tab</h2>
<p class="section box-left">The <strong>tab</strong> module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want.</p>
<a href="tab.html" class="button section">See more</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 row">
<div class="card fluid">
<h2 class="section"><mark class="secondary"><i class="fa fa-tags fa-fw" aria-hidden="true"></i></mark>&nbsp;Contextual</h2>
<p class="section box-left">The <strong>contextual</strong> module provides you with simple tags, marks and highlights for your pages, allowing you to easily emphasize parts of your text. The contextual alerts aim to replace the commonly used modal dialog design paradigm with a more modern one. HTML5 elements and simple rules are used in order to make important messages and pieces of content stand out easily.</p>
<a href="contextual.html" class="button section">See more</a>
</div>
</div>
</div>
<div class="row box-centered" style="padding-bottom: 40px;">
<div class="col-sm-12 col-md-6 col-lg-5 col-lg-offset-1 row">
<div class="card fluid">
<h2 class="section"><mark class="tertiary"><i class="fa fa-spinner fa-fw" aria-hidden="true"></i></mark>&nbsp;Progress</h2>
<p class="section box-left">The <strong>progress</strong> module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading.</p>
<a href="progress.html" class="button section">See more</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-5 row">
<div class="card fluid">
<h2 class="section"><mark class="tertiary"><i class="fa fa-wrench fa-fw" aria-hidden="true"></i></mark>&nbsp;Utility</h2>
<p class="section box-left">The <strong>utility</strong> module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere.</p>
<a href="utility.html" class="button section">See more</a>
</div>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

View file

@ -1,236 +1,236 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Navigation</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, navigation ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-lg-4.col-lg-normal {box-sizing: border-box; border-right: 1px solid #bdbdbd;}
@media (max-width: 1279px){.col-sm-12.col-sm-last.col-lg-4.col-lg-normal {border: 0;border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored { color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Navigation</h1>
<p>The <strong>navigation</strong> module seeks to remedy the problems of vertical and horizontal navigation design paradigms, by combining the two for a better presentational effect. HTML5 navigational elements are at the heart of the module, allowing you to quickly build your navigation without complicated structures and hacks.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Navigation</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Menus and navigation are some of the most important elements for any website or web app and their design and ease-of-use are key factors that can determine a page's bounce rates. The <strong>navigation</strong> module takes a step back from all the complicated menu and navigation design paradigms of the modern web, like dropdown menus and hamburger buttons, and tries to reinvent the basics for page navigation using HTML5 elements (i.e. <code>header</code>, <code>nav</code> and <code>footer</code>) and make navigation fully accessible for screen readers. Instead of sticking to either horizontal navigation menus (headers) or vertical menus (sidebars), we opted to allow the use of both for different things. Header menus are designed to stand out and contain links to help users find new content, whereas vertical navigation aims to provide a more traditional navigation menu that maps out your website's structure. Finally, footers are also part of the <strong>navigation</strong> module, as they can often provide the user with useful information and/or links that are very important to enhancing their experience.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>navigation</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Header</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<div><br>
<header>
<a href="#" class="logo">Logo</a> <button>Home</button>
<a href="#" class="button">News</a> <span>|</span>
<button>About</button> <button>Contact</button>
</header> <br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>The <code>&lt;header&gt;</code> HTML element is used for a page's top horizontal navigation menu. It can contain a unique <code>.logo</code> element as its first child (this structure is not mandatory, but still recommended as a best practice), which can be either text (with or without a link) or an image. The rest of the elements inside the <code>&lt;header&gt;</code> must be button elements (i.e. <code>&lt;button&gt;</code>, <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">&quot;button&quot;</span>&gt;</code>, <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>&quot;</span></code> or <code>.button</code>) in order to be styled properly. Textual separators between those can be added using <code>&lt;span&gt;</code> elements.</p>
<h3>Sample code</h3>
<pre>&lt;header&gt;
&lt;a href=&quot;#&quot; class=&quot;logo&quot;&gt;Logo&lt;/a&gt;
&lt;button&gt;Home&lt;/button&gt;
&lt;a href=&quot;#&quot; class=&quot;button&quot;&gt;News&lt;/a&gt;
&lt;span&gt;|&lt;/span&gt;
&lt;button&gt;About&lt;/button&gt;
&lt;a href=&quot;#&quot; role=&quot;button&quot;&gt;Contact&lt;/a&gt;
&lt;/header&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The <code>&lt;header&gt;</code> element is partially responsive on smaller screen devices. More specifically, when the content inside it exceeds the width of the viewport (ie. overflows to the right), users will be able to scroll horizontally in order to see the rest of the menu.</li>
<li>The <code>&lt;header&gt;</code> element does not display as <code class="fore-tertiary">fixed</code> by default. You can, however, alter this CSS property manually, if you so desire.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;header&gt;
&lt;a href=&quot;#&quot; class=&quot;logo&quot;&gt;Logo&lt;/a&gt;
&lt;button&gt;Action 1&lt;/button&gt;
&lt;a href=&quot;#&quot; class=&quot;button&quot;&gt;Action 2&lt;/a&gt;
&lt;label class=&quot;button&quot;&gt;Action 3&lt;/label&gt;
&lt;/header&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can mix different elements styled like buttons inside a <code>&lt;header&gt;</code> element. In fact, we strongly recommend doing so, if you need to.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;header&gt;
&lt;a href=&quot;#&quot; class=&quot;button logo&quot;&gt;Logo&lt;/a&gt;
&lt;/header&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;header&gt;
&lt;a href=&quot;#&quot; class=&quot;logo&quot;&gt;Logo&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;
&lt;/header&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;The <code>.logo</code> element should neither be a <code>&lt;button&gt;</code> or a <code>.button</code> element nor have the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>&quot;</span></code> attribute. On the other hand, links and labels in the <code>&lt;header&gt;</code> should not be without a <code>.button</code> class or a <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>&quot;</span></code> attribute. Ignoring this rule might cause unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Navigation bar</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<div><br>
<nav>
<a href="#">Home</a> <span>News</span>
<a href="#" class="sublink-1">New Courses</a> <a href="#" class="sublink-1">Certifications</a>
<span class="sublink-1">Events</span> <a href="#" class="sublink-2">Course Showcase - 12th, Dec</a>
<a href="#" class="sublink-2">Staff AMA - 16th, Dec</a> <a href="#" class="sublink-1">Policy Update</a>
<a href="#">About</a> <a href="#">Contact</a>
</nav><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>To add vertical navigation to your websites, use the <code>&lt;nav&gt;</code> HTML element. Adding links is pretty simple, just use <code>&lt;a&gt;</code> elements, no lists or anything else required. In order to add subcategories to your vertical navigation, use any normal textual element as the title of the subcategory and follow it with its links as normal, adding the <code>.sublink-1</code> class to them. Similarly, you can create a subcategory with a depth of 2, using a similar structure and the <code>.sublink-2</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;nav&gt;
&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;
&lt;span&gt;News&lt;/span&gt;
&lt;a href=&quot;#&quot; class=&quot;sublink-1&quot;&gt;New Courses&lt;/a&gt;
&lt;a href=&quot;#&quot; class=&quot;sublink-1&quot;&gt;Certifications&lt;/a&gt;
&lt;span class=&quot;sublink-1&quot;&gt;Events&lt;/span&gt;
&lt;a href=&quot;#&quot; class=&quot;sublink-2&quot;&gt;Course Showcase - 12th, Dec&lt;/a&gt;
&lt;a href=&quot;#&quot; class=&quot;sublink-2&quot;&gt;Staff AMA - 16th, Dec&lt;/a&gt;
&lt;a href=&quot;#&quot; class=&quot;sublink-1&quot;&gt;Policy Update&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Contact&lt;/a&gt;
&lt;/nav&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Subcategories and their links support a depth of 2 by default. If, however, you need more than that, we recommend you check the <a href="customization.html">customization page</a> for instructions on how to add more depth to the vertical navigation.</li>
<li>We strongly suggest you do not add irrelevant things inside your <code>&lt;nav&gt;</code> element, like images or text that are not part of the navigation menu.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12">
<pre>&lt;div class=&quot;col-sm-12 col-sm-last col-md-3 col-md-first&quot;&gt;
&lt;nav&gt;
<span class="fore-tertiary">&lt;!-- navigation content --&gt;</span>
&lt;/nav&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;We strongly recommend using the <code>&lt;nav&gt;</code> element in combination with the <a href="grid.html"><strong>grid</strong></a> module to make your layouts more responsive. For example, you could make your sidebar appear on the left side of your content in medium-sized and larger screens, but move to the very bottom of your content on smaller screens.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Footer</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<div><br>
<footer> <p>&copy; 2001-2016 Web Corporation | <a href="#">About</a> | <a href="#">Terms of use</a></p> </footer> <br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>The <code>&lt;footer&gt;</code> element is used to create your page's footer. As normal, add the <code>&lt;footer&gt;</code> at or near the end of your <code>&lt;body&gt;</code> element and add content to it like you would otherwise.</p>
<h3>Sample code</h3>
<pre>&lt;footer&gt;
&lt;p&gt;&amp;copy; 2001-2016 Web Corporation | &lt;a href=&quot;#&quot;&gt;About&lt;/a&gt; | &lt;a href=&quot;#&quot;&gt;Terms of use&lt;/a&gt;&lt;/p&gt;
&lt;/footer&gt;</pre>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Sticky headers and footers</h2></div>
<div class="section row">
<div class="col-sm-12">
<p>You can create sticky headers and footers, using the <code>.sticky</code> class on either of these elements.</p>
<h3>Sample code</h3>
<pre>&lt;header class=&quot;sticky&quot;&gt;
&lt;a href=&quot;#&quot; class=&quot;logo&quot;&gt;Logo&lt;/a&gt; &lt;button&gt;Home&lt;/button&gt; &lt;button&gt;About&lt;/button&gt;
&lt;/header&gt;
&lt;footer class=&quot;sticky&quot;&gt;
&lt;p&gt;&amp;copy; 2001-2016 Web Corporation | &lt;a href=&quot;#&quot;&gt;About&lt;/a&gt; | &lt;a href=&quot;#&quot;&gt;Terms of use&lt;/a&gt;&lt;/p&gt;
&lt;/footer&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Sticky headers and footers are compatible with modern browsers, but might not display properly in older browsers. Support is being added over time, so be sure to check out if your target platforms support <a href="http://caniuse.com/#feat=css-sticky"><code>position:sticky</code></a>.</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Navigation</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, navigation ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-lg-4.col-lg-normal {box-sizing: border-box; border-right: 1px solid #bdbdbd;}
@media (max-width: 1279px){.col-sm-12.col-sm-last.col-lg-4.col-lg-normal {border: 0;border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored { color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Navigation</h1>
<p>The <strong>navigation</strong> module seeks to remedy the problems of vertical and horizontal navigation design paradigms, by combining the two for a better presentational effect. HTML5 navigational elements are at the heart of the module, allowing you to quickly build your navigation without complicated structures and hacks.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Navigation</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Menus and navigation are some of the most important elements for any website or web app and their design and ease-of-use are key factors that can determine a page's bounce rates. The <strong>navigation</strong> module takes a step back from all the complicated menu and navigation design paradigms of the modern web, like dropdown menus and hamburger buttons, and tries to reinvent the basics for page navigation using HTML5 elements (i.e. <code>header</code>, <code>nav</code> and <code>footer</code>) and make navigation fully accessible for screen readers. Instead of sticking to either horizontal navigation menus (headers) or vertical menus (sidebars), we opted to allow the use of both for different things. Header menus are designed to stand out and contain links to help users find new content, whereas vertical navigation aims to provide a more traditional navigation menu that maps out your website's structure. Finally, footers are also part of the <strong>navigation</strong> module, as they can often provide the user with useful information and/or links that are very important to enhancing their experience.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>navigation</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Header</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<div><br>
<header>
<a href="#" class="logo">Logo</a> <button>Home</button>
<a href="#" class="button">News</a> <span>|</span>
<button>About</button> <button>Contact</button>
</header> <br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>The <code>&lt;header&gt;</code> HTML element is used for a page's top horizontal navigation menu. It can contain a unique <code>.logo</code> element as its first child (this structure is not mandatory, but still recommended as a best practice), which can be either text (with or without a link) or an image. The rest of the elements inside the <code>&lt;header&gt;</code> must be button elements (i.e. <code>&lt;button&gt;</code>, <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">&quot;button&quot;</span>&gt;</code>, <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>&quot;</span></code> or <code>.button</code>) in order to be styled properly. Textual separators between those can be added using <code>&lt;span&gt;</code> elements.</p>
<h3>Sample code</h3>
<pre>&lt;header&gt;
&lt;a href=&quot;#&quot; class=&quot;logo&quot;&gt;Logo&lt;/a&gt;
&lt;button&gt;Home&lt;/button&gt;
&lt;a href=&quot;#&quot; class=&quot;button&quot;&gt;News&lt;/a&gt;
&lt;span&gt;|&lt;/span&gt;
&lt;button&gt;About&lt;/button&gt;
&lt;a href=&quot;#&quot; role=&quot;button&quot;&gt;Contact&lt;/a&gt;
&lt;/header&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The <code>&lt;header&gt;</code> element is partially responsive on smaller screen devices. More specifically, when the content inside it exceeds the width of the viewport (ie. overflows to the right), users will be able to scroll horizontally in order to see the rest of the menu.</li>
<li>The <code>&lt;header&gt;</code> element does not display as <code class="fore-tertiary">fixed</code> by default. You can, however, alter this CSS property manually, if you so desire.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;header&gt;
&lt;a href=&quot;#&quot; class=&quot;logo&quot;&gt;Logo&lt;/a&gt;
&lt;button&gt;Action 1&lt;/button&gt;
&lt;a href=&quot;#&quot; class=&quot;button&quot;&gt;Action 2&lt;/a&gt;
&lt;label class=&quot;button&quot;&gt;Action 3&lt;/label&gt;
&lt;/header&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can mix different elements styled like buttons inside a <code>&lt;header&gt;</code> element. In fact, we strongly recommend doing so, if you need to.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;header&gt;
&lt;a href=&quot;#&quot; class=&quot;button logo&quot;&gt;Logo&lt;/a&gt;
&lt;/header&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;header&gt;
&lt;a href=&quot;#&quot; class=&quot;logo&quot;&gt;Logo&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;
&lt;/header&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;The <code>.logo</code> element should neither be a <code>&lt;button&gt;</code> or a <code>.button</code> element nor have the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>&quot;</span></code> attribute. On the other hand, links and labels in the <code>&lt;header&gt;</code> should not be without a <code>.button</code> class or a <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role">button</a>&quot;</span></code> attribute. Ignoring this rule might cause unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Navigation bar</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<div><br>
<nav>
<a href="#">Home</a> <span>News</span>
<a href="#" class="sublink-1">New Courses</a> <a href="#" class="sublink-1">Certifications</a>
<span class="sublink-1">Events</span> <a href="#" class="sublink-2">Course Showcase - 12th, Dec</a>
<a href="#" class="sublink-2">Staff AMA - 16th, Dec</a> <a href="#" class="sublink-1">Policy Update</a>
<a href="#">About</a> <a href="#">Contact</a>
</nav><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>To add vertical navigation to your websites, use the <code>&lt;nav&gt;</code> HTML element. Adding links is pretty simple, just use <code>&lt;a&gt;</code> elements, no lists or anything else required. In order to add subcategories to your vertical navigation, use any normal textual element as the title of the subcategory and follow it with its links as normal, adding the <code>.sublink-1</code> class to them. Similarly, you can create a subcategory with a depth of 2, using a similar structure and the <code>.sublink-2</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;nav&gt;
&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;
&lt;span&gt;News&lt;/span&gt;
&lt;a href=&quot;#&quot; class=&quot;sublink-1&quot;&gt;New Courses&lt;/a&gt;
&lt;a href=&quot;#&quot; class=&quot;sublink-1&quot;&gt;Certifications&lt;/a&gt;
&lt;span class=&quot;sublink-1&quot;&gt;Events&lt;/span&gt;
&lt;a href=&quot;#&quot; class=&quot;sublink-2&quot;&gt;Course Showcase - 12th, Dec&lt;/a&gt;
&lt;a href=&quot;#&quot; class=&quot;sublink-2&quot;&gt;Staff AMA - 16th, Dec&lt;/a&gt;
&lt;a href=&quot;#&quot; class=&quot;sublink-1&quot;&gt;Policy Update&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt;
&lt;a href=&quot;#&quot;&gt;Contact&lt;/a&gt;
&lt;/nav&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Subcategories and their links support a depth of 2 by default. If, however, you need more than that, we recommend you check the <a href="customization.html">customization page</a> for instructions on how to add more depth to the vertical navigation.</li>
<li>We strongly suggest you do not add irrelevant things inside your <code>&lt;nav&gt;</code> element, like images or text that are not part of the navigation menu.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12">
<pre>&lt;div class=&quot;col-sm-12 col-sm-last col-md-3 col-md-first&quot;&gt;
&lt;nav&gt;
<span class="fore-tertiary">&lt;!-- navigation content --&gt;</span>
&lt;/nav&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;We strongly recommend using the <code>&lt;nav&gt;</code> element in combination with the <a href="grid.html"><strong>grid</strong></a> module to make your layouts more responsive. For example, you could make your sidebar appear on the left side of your content in medium-sized and larger screens, but move to the very bottom of your content on smaller screens.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Footer</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-lg-4 col-lg-normal">
<div><br>
<footer> <p>&copy; 2001-2016 Web Corporation | <a href="#">About</a> | <a href="#">Terms of use</a></p> </footer> <br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>The <code>&lt;footer&gt;</code> element is used to create your page's footer. As normal, add the <code>&lt;footer&gt;</code> at or near the end of your <code>&lt;body&gt;</code> element and add content to it like you would otherwise.</p>
<h3>Sample code</h3>
<pre>&lt;footer&gt;
&lt;p&gt;&amp;copy; 2001-2016 Web Corporation | &lt;a href=&quot;#&quot;&gt;About&lt;/a&gt; | &lt;a href=&quot;#&quot;&gt;Terms of use&lt;/a&gt;&lt;/p&gt;
&lt;/footer&gt;</pre>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Sticky headers and footers</h2></div>
<div class="section row">
<div class="col-sm-12">
<p>You can create sticky headers and footers, using the <code>.sticky</code> class on either of these elements.</p>
<h3>Sample code</h3>
<pre>&lt;header class=&quot;sticky&quot;&gt;
&lt;a href=&quot;#&quot; class=&quot;logo&quot;&gt;Logo&lt;/a&gt; &lt;button&gt;Home&lt;/button&gt; &lt;button&gt;About&lt;/button&gt;
&lt;/header&gt;
&lt;footer class=&quot;sticky&quot;&gt;
&lt;p&gt;&amp;copy; 2001-2016 Web Corporation | &lt;a href=&quot;#&quot;&gt;About&lt;/a&gt; | &lt;a href=&quot;#&quot;&gt;Terms of use&lt;/a&gt;&lt;/p&gt;
&lt;/footer&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Sticky headers and footers are compatible with modern browsers, but might not display properly in older browsers. Support is being added over time, so be sure to check out if your target platforms support <a href="http://caniuse.com/#feat=css-sticky"><code>position:sticky</code></a>.</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

View file

@ -1,223 +1,223 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Progress</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, progress ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; }
.box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
.box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #bdbdbd;}
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0;border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Progress</h1>
<p>The <strong>progress</strong> module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Progress</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Progress indicators are very common UI elements for almost any website and web app, as they help communicate vital information such as the fact that a process is being executed in the background, informing the user that they should wait for it to complete before proceeding. The <strong>progress</strong> module provides you with two essential tools to communicate this information: the <code>&lt;progress&gt;</code> HTML element, which is pre-styled and compatible with modern browsers to help you communicate information about the percentage of a task and the <code>.spinner-donut</code> class that allows you to create an animated spinner that communicates that something is loading currently and will continue doing so for an indefinite amount of time. Both elements come with their own color and size variants and are fully accessible.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>progress</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Basic progress bar</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<p>Process is 0% complete!</p> <progress value="0" max="1000"></progress>
<p>Process is 45% complete!</p> <progress value="450" max="1000"></progress>
<p>Process is 100% complete!</p> <progress value="1000" max="1000"></progress>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>To create a progress bar, use the <code>&lt;progress&gt;</code> HTML element, specify the preset maximum of <code><span class="fore-secondary">max</span>=<span class="fore-primary">&quot;1000&quot;</span></code> and set a <code>value</code> between <code>0</code> and <code>1000</code>. Update your <code>&lt;progress&gt;</code> element using some Javascript code, by changing its <code>value</code> to any integer in the same range.</p>
<h3>Sample code</h3>
<pre>&lt;progress value=&quot;0&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
&lt;progress value=&quot;450&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
&lt;progress value=&quot;1000&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>We made sure that the <code>&lt;progress&gt;</code> element displays properly on all modern browsers, using browser-specific rules. However, there might be some irregularities with older browsers, especially legacy versions of Internet Explorer.</li>
<li>If the preset <code>max="1000"</code> does not suit your needs, you should check the <a href="customization.html">customization page</a> for instructions on how to set your own maximum value for the <code>&lt;progress&gt;</code> element.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;progress value=&quot;80&quot; max=&quot;100&quot;&gt;&lt;/progress&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using different values for the <code>&lt;progress&gt;</code> element's <code>max</code>, except for the preset one (<code>1000</code>).</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;progress value=&quot;450.5&quot; max=&quot;1000.0&quot;&gt;&lt;/progress&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Try not to use floating point values for either the <code>&lt;progress&gt;</code> element's <code>value</code> or <code>max</code>. During testing of the module, we found that floating point values could cause unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Progress bar variants</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<p>Secondary process is 60% complete!</p> <progress class="secondary" value="600" max="1000"></progress>
<p>Tertiary process is 30% complete!</p> <progress class="tertiary" value="300" max="1000"></progress>
<p>Nano progress bar is 75% filled!</p> <progress class="nano" value="750" max="1000"></progress>
<p>Inline progress bar:<progress class="inline" value="150" max="1000"></progress></p>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Apart from the default style for the <code>&lt;progress&gt;</code> element, we have also included a couple of variants for it. First off, you can change the color of your progress bars, based on the context, using the <code>.secondary</code> or <code>.tertiary</code> class. You can also make a <code>&lt;progress&gt;</code> element tiny, using the <code>.nano</code> class. Finally, you can create inline progress bars, using the <code>.inline</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;progress class=&quot;secondary&quot; value=&quot;600&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
&lt;progress class=&quot;tertiary&quot; value=&quot;300&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
&lt;progress class=&quot;nano&quot; value=&quot;750&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
&lt;progress class=&quot;inline&quot; value=&quot;150&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>If you want to add your own custom size classes for <code>&lt;progress&gt;</code> elements, check the <a href="customization.html">customization page</a> for instructions.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;progress class=&quot;nano secondary&quot; value=&quot;800&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;progress class=&quot;inline tertiary&quot; value=&quot;650&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can mix size and color classes for <code>&lt;progress&gt;</code> elements as needed.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;progress class=&quot;secondary teriary&quot; value=&quot;450&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;progress class=&quot;inline nano&quot; value=&quot;300&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid mixing two classes of the same type (i.e. two color classes or two size classes).</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Donut spinner</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div class="box-centered"><br>
<div class="spinner-donut"></div><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Donut spinners can be used to indicate that something is loading or that a process is running in the background. To create a donut spinner, add the <code>.spinner-donut</code> class to an element of your liking. We would recommend using a <code>&lt;div&gt;</code> element for most cases, but <code>&lt;span&gt;</code> elements should work pretty well, too.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;spinner-donut&quot;&gt;&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The <code>.spinner-donut</code> is an animated component, meaning that if a browsers does not support animation, this element might display incorrectly.</li>
<li>In certain cases, it might be useful to add the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_progressbar_role">progressbar</a>&quot;</span></code> attribute to increase donut spinner accessibility.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;p&gt;Loading... &lt;span class=&quot;spinner-donut&quot;&gt;&lt;/span&gt;&lt;/p&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can place a <code>.spinner-donut</code> inside a paragraph or some other textual context and it will display inline.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;spinner-donut&quot;&gt;Loading...&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid inserting text inside the <code>.spinner-donut</code>, as this might cause unexpected bahavior and will probably make the text spin along with it.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Donut spinner variants</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div class="box-centered"><br>
<div class="spinner-donut secondary"></div><br> <div class="spinner-donut tertiary"></div><br> <div class="spinner-donut large"></div><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Apart from the default donut spinner style, there are also two more contextual color classes: <code>.secondary</code> and <code>.tertiary</code>. If your donut spinners are too small, you can also use the <code>.large</code> class to make it pop out a little bit more.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;spinner-donut secondary&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;spinner-donut tertiary&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;spinner-donut large&quot;&gt;&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>You can mix one of the contextual color classes and the <code>.large</code> class, if you want, similarly to what you can do with progress bars.</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Progress</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, progress ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; }
.box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;}
.box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #bdbdbd;}
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0;border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Progress</h1>
<p>The <strong>progress</strong> module gives you full control over the presentation of progress and loading on your pages. Apart from progress bars and color variants for them, spinner elements are provided to help communicate that something is loading.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Progress</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Progress indicators are very common UI elements for almost any website and web app, as they help communicate vital information such as the fact that a process is being executed in the background, informing the user that they should wait for it to complete before proceeding. The <strong>progress</strong> module provides you with two essential tools to communicate this information: the <code>&lt;progress&gt;</code> HTML element, which is pre-styled and compatible with modern browsers to help you communicate information about the percentage of a task and the <code>.spinner-donut</code> class that allows you to create an animated spinner that communicates that something is loading currently and will continue doing so for an indefinite amount of time. Both elements come with their own color and size variants and are fully accessible.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>progress</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Basic progress bar</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<p>Process is 0% complete!</p> <progress value="0" max="1000"></progress>
<p>Process is 45% complete!</p> <progress value="450" max="1000"></progress>
<p>Process is 100% complete!</p> <progress value="1000" max="1000"></progress>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>To create a progress bar, use the <code>&lt;progress&gt;</code> HTML element, specify the preset maximum of <code><span class="fore-secondary">max</span>=<span class="fore-primary">&quot;1000&quot;</span></code> and set a <code>value</code> between <code>0</code> and <code>1000</code>. Update your <code>&lt;progress&gt;</code> element using some Javascript code, by changing its <code>value</code> to any integer in the same range.</p>
<h3>Sample code</h3>
<pre>&lt;progress value=&quot;0&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
&lt;progress value=&quot;450&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
&lt;progress value=&quot;1000&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>We made sure that the <code>&lt;progress&gt;</code> element displays properly on all modern browsers, using browser-specific rules. However, there might be some irregularities with older browsers, especially legacy versions of Internet Explorer.</li>
<li>If the preset <code>max="1000"</code> does not suit your needs, you should check the <a href="customization.html">customization page</a> for instructions on how to set your own maximum value for the <code>&lt;progress&gt;</code> element.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;progress value=&quot;80&quot; max=&quot;100&quot;&gt;&lt;/progress&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using different values for the <code>&lt;progress&gt;</code> element's <code>max</code>, except for the preset one (<code>1000</code>).</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;progress value=&quot;450.5&quot; max=&quot;1000.0&quot;&gt;&lt;/progress&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Try not to use floating point values for either the <code>&lt;progress&gt;</code> element's <code>value</code> or <code>max</code>. During testing of the module, we found that floating point values could cause unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Progress bar variants</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<p>Secondary process is 60% complete!</p> <progress class="secondary" value="600" max="1000"></progress>
<p>Tertiary process is 30% complete!</p> <progress class="tertiary" value="300" max="1000"></progress>
<p>Nano progress bar is 75% filled!</p> <progress class="nano" value="750" max="1000"></progress>
<p>Inline progress bar:<progress class="inline" value="150" max="1000"></progress></p>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Apart from the default style for the <code>&lt;progress&gt;</code> element, we have also included a couple of variants for it. First off, you can change the color of your progress bars, based on the context, using the <code>.secondary</code> or <code>.tertiary</code> class. You can also make a <code>&lt;progress&gt;</code> element tiny, using the <code>.nano</code> class. Finally, you can create inline progress bars, using the <code>.inline</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;progress class=&quot;secondary&quot; value=&quot;600&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
&lt;progress class=&quot;tertiary&quot; value=&quot;300&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
&lt;progress class=&quot;nano&quot; value=&quot;750&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
&lt;progress class=&quot;inline&quot; value=&quot;150&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>If you want to add your own custom size classes for <code>&lt;progress&gt;</code> elements, check the <a href="customization.html">customization page</a> for instructions.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;progress class=&quot;nano secondary&quot; value=&quot;800&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;progress class=&quot;inline tertiary&quot; value=&quot;650&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can mix size and color classes for <code>&lt;progress&gt;</code> elements as needed.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;progress class=&quot;secondary teriary&quot; value=&quot;450&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;progress class=&quot;inline nano&quot; value=&quot;300&quot; max=&quot;1000&quot;&gt;&lt;/progress&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid mixing two classes of the same type (i.e. two color classes or two size classes).</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Donut spinner</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div class="box-centered"><br>
<div class="spinner-donut"></div><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Donut spinners can be used to indicate that something is loading or that a process is running in the background. To create a donut spinner, add the <code>.spinner-donut</code> class to an element of your liking. We would recommend using a <code>&lt;div&gt;</code> element for most cases, but <code>&lt;span&gt;</code> elements should work pretty well, too.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;spinner-donut&quot;&gt;&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The <code>.spinner-donut</code> is an animated component, meaning that if a browsers does not support animation, this element might display incorrectly.</li>
<li>In certain cases, it might be useful to add the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_progressbar_role">progressbar</a>&quot;</span></code> attribute to increase donut spinner accessibility.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;p&gt;Loading... &lt;span class=&quot;spinner-donut&quot;&gt;&lt;/span&gt;&lt;/p&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can place a <code>.spinner-donut</code> inside a paragraph or some other textual context and it will display inline.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;spinner-donut&quot;&gt;Loading...&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid inserting text inside the <code>.spinner-donut</code>, as this might cause unexpected bahavior and will probably make the text spin along with it.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Donut spinner variants</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div class="box-centered"><br>
<div class="spinner-donut secondary"></div><br> <div class="spinner-donut tertiary"></div><br> <div class="spinner-donut large"></div><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Apart from the default donut spinner style, there are also two more contextual color classes: <code>.secondary</code> and <code>.tertiary</code>. If your donut spinners are too small, you can also use the <code>.large</code> class to make it pop out a little bit more.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;spinner-donut secondary&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;spinner-donut tertiary&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;spinner-donut large&quot;&gt;&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>You can mix one of the contextual color classes and the <code>.large</code> class, if you want, similarly to what you can do with progress bars.</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -1,280 +1,280 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Tab</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, tab, tabs ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #bdbdbd;}
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Tab</h1>
<p>The <strong>tab</strong> module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Tab</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Spoilers, collapses, accordions, tabs, carousels have been a staple of modern design for quite a long time. All of these elements are implemented using the <strong>tab</strong> module's single generic container. The tab container replaces all of these design paradigms with one component that is very flexible and responsive in order to let you present your website or app's content any way you like. Tabbed navigation is very easy to implement, while collapse, accordion and carousel components use the stacked architecture of tabs. As usual, the tab container is responsive and accessible, allowing you to deliver your content properly to all devices and users.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>tab</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Basic syntax</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div class="tabs" style="margin-top: 5px; margin-bottom: 5px;">
<input type="radio" name="tabdemo" id="tab1" checked aria-hidden="true">
<label for="tab1" aria-hidden="true">Tab 1</label>
<div> <h3>Tab 1</h3> <p>This is the first tab's content.</p> </div>
<input type="radio" name="tabdemo" id="tab2" aria-hidden="true">
<label for="tab2" aria-hidden="true">Tab 2</label>
<div> <h3>Tab 2</h3> <p>This is the second tab's content.</p> </div>
<input type="radio" name="tabdemo" id="tab3" aria-hidden="true">
<label for="tab3" aria-hidden="true">Tab 3</label>
<div> <h3>Tab 3</h3> <p>This is the third tab's content.</p> </div>
<input type="radio" name="tabdemo" id="tab4" aria-hidden="true">
<label for="tab4" aria-hidden="true">Tab 4</label>
<div> <h3>Tab 4</h3> <p>This is the fourth tab's content.</p> </div>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>The tab container's basic sytanx is composed of two components, presented below in the order they should be added to the DOM tree:</p>
<ul>
<li>At the outermost level of the tab container is a <code>&lt;div&gt;</code> element implementing the <code>.tabs</code> class. This serves as the wrapper of the tab container.</li>
<li>Inside the <code>.tabs</code> container, add a set of the following three elements for each tab:
<ol>
<li>First, add an <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">&quot;radio&quot;</span>&gt;</code> element. Give it a <code><span class="fore-secondary">name</span></code> and an <code><span class="fore-secondary">id</span></code> in order to be able to link to it and group it with the rest of the radio buttons in the container.</li>
<li>Follow the <code>&lt;input&gt;</code> element with a <code>&lt;label&gt;</code> element linking to it. Inside this element, add the text you want to be shown as the title of your tab.</li>
<li>Finally, add a <code>&lt;div&gt;</code> immediately after the <code>&lt;label&gt;</code>'s closing tag. This will be the panel that contains the tab's content. Inside this element, you can add all the content you want in your tab (headings, images, text).</li>
</ol>
</li>
</ul>
<p>Tabs are responsive and will collapse into a stacked display on smaller screens, allowing the user to view the actual content more easily. The tab container's syntax is accessible, but parts of it might confuse screen readers, so we suggest adding the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">&quot;true&quot;</span></code> attribute to all the <code>&lt;input&gt;</code> and <code>&lt;label&gt;</code> elements inside the <code>.tabs</code> container.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;tabs&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab1&quot; aria-hidden=&quot;true&quot;&gt;Tab 1&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Tab 1&lt;/h3&gt;
&lt;p&gt;This is the first tab's content.&lt;/p&gt;
&lt;/div&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab2&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab2&quot; aria-hidden=&quot;true&quot;&gt;Tab 2&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Tab 2&lt;/h3&gt;
&lt;p&gt;This is the second tab's content.&lt;/p&gt;
&lt;/div&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab3&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab3&quot; aria-hidden=&quot;true&quot;&gt;Tab 3&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Tab 3&lt;/h3&gt;
&lt;p&gt;This is the third tab's content.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Tabs are compatible with modern browsers, but might not display properly in older browsers.</li>
<li>Remember to add the <code><span class="fore-secondary">checked</span></code> attribute to one of your <code>&lt;input&gt;</code>s if you want that tab to be the one displayed by default. If none is specified, the first one will be displayed.</li>
<li>The <code>height</code> of the tab container's panel area is <code>400px</code>. If you want to change this default size, please check out the <a href="customization.html">customization</a> page.</li>
<li>Using the method described above for making tabs accessible, screen readers will ignore tab controls and only read the content of tabs.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;tabs&quot;&gt;
&lt;input type=&quot;checkbox&quot; name=&quot;tab-group&quot; id=&quot;tab1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab1&quot; aria-hidden=&quot;true&quot;&gt;Tab 1&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Bad Tab&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Do not use checkboxes inside the default <code>.tabs</code> container, otherwise you might notice unexpected behavior. If you want to use an <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">&quot;checkbox&quot;</span>&gt;</code>, check out the next section.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;tabs&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab1&quot; aria-hidden=&quot;true&quot;&gt;Tab 1&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Lonely Tab&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;You can add a single tab in a <code>.tabs</code> container, but what use would that be? You should probably read the next section to see what you can do with a stacked tab container instead.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;tabs&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab1&quot; aria-hidden=&quot;true&quot;&gt;Tab 1&lt;/label&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab2&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab2&quot; aria-hidden=&quot;true&quot;&gt;Tab 2&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Bad Tab&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;Bad Tab&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;The syntax and structure of the tab container is very strict. Try to follow it exactly as described in this section.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;tabs&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab1&quot; checked&gt;
&lt;label for=&quot;tab1&quot;&gt;Tab&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Not fully accessible tab&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Remember to use the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">&quot;true&quot;</span></code> attribute to make your tabs fully accessible.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Stacked tabs</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div class="tabs stacked" style="margin-top: 5px; margin-bottom: 5px;">
<input type="radio" name="accordion" id="a1" autocomplete="off" checked aria-hidden="true">
<label for="a1" aria-hidden="true">Accordion section 1</label>
<div> <h3>Section 1</h3> <p>This is the first accordion section's content.</p> </div>
<input type="radio" name="accordion" id="a2" autocomplete="off" aria-hidden="true">
<label for="a2" aria-hidden="true">Accordion section 2</label>
<div> <h3>Section 2</h3> <p>This is the second accordion section's content.</p> </div>
</div>
<div class="tabs stacked" style="margin-top: 5px; margin-bottom: 5px;">
<input type="checkbox" id="c1" autocomplete="off" aria-hidden="true">
<label for="c1" aria-hidden="true">Collapse section 1</label>
<div> <p>This is the first collapse section's content.</p> </div>
<input type="checkbox" id="c2" autocomplete="off" aria-hidden="true">
<label for="c2" aria-hidden="true">Collapse section 2</label>
<div> <p>This is the second collapse section's content.</p> </div>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Apart from the normal tab layout, you can make your tabs stacked instead, using the <code>.stacked</code> class in your <code>.tabs</code> container element. Stacked tabs are more versatile, allowing you to use checkboxes and/or radio buttons to implement collapses, accordions and spoilers. Carousel-styled elements can also be displayed in this fashion, if you wish. Remember to use the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">&quot;true&quot;</span></code> attribute to make your tabs fully accessible, as before.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;tabs stacked&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;accordion&quot; id=&quot;a1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;a1&quot; aria-hidden=&quot;true&quot;&gt;Accordion section 1&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Section 1&lt;/h3&gt;
&lt;p&gt;This is the first accordion section's content.&lt;/p&gt;
&lt;/div&gt;
&lt;input type=&quot;radio&quot; name=&quot;accordion&quot; id=&quot;a2&quot;aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;a2&quot; aria-hidden=&quot;true&quot;&gt;Accordion section 2&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Section 2&lt;/h3&gt;
&lt;p&gt;This is the second accordion section's content.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;tabs stacked&quot;&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;c1&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;c1&quot; aria-hidden=&quot;true&quot;&gt;Collapse section 1&lt;/label&gt;
&lt;div&gt;
&lt;p&gt;This is the first collapse section's content.&lt;/p&gt;
&lt;/div&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;c2&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;c2&quot; aria-hidden=&quot;true&quot;&gt;Collapse section 2&lt;/label&gt;
&lt;div&gt;
&lt;p&gt;This is the second collapse section's content.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li><code>.stacked</code> tabs can be used with either checkboxes or radio buttons.</li>
<li>You can mix and match checkboxes and radio buttons, but we suggest you do not do so, unless you think it is necessary for your design.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;div class=&quot;tabs stacked&quot;&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;c1&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;c1&quot; aria-hidden=&quot;true&quot;&gt;Single collapse&lt;/label&gt;
&lt;div&gt;
&lt;p&gt;This is a singular collapse.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can implement single collapses (otherwise known as spoilers), using a <code>.tabs</code><code>.stacked</code> container with only one checkbox-based tab.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;tabs stacked&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;accordion&quot; id=&quot;a1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;a1&quot; aria-hidden=&quot;true&quot;&gt;Single accordion section&lt;/label&gt;
&lt;div&gt;
&lt;p&gt;This accordion section cannot close once opened&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid having a single radio-based tab in a <code>.tabs</code><code>.stacked</code> container, as this might result in unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Tab</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, tab, tabs ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #bdbdbd;}
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Tab</h1>
<p>The <strong>tab</strong> module aims to combine multiple components and design paradigms, like collapses, accordions, carousels and tabs, into one general-purpose component. Tabs are very simple in structure, responsive on mobile and they allow for layout customization so that you can turn them into accordions or collapses whenever you want.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Tab</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Spoilers, collapses, accordions, tabs, carousels have been a staple of modern design for quite a long time. All of these elements are implemented using the <strong>tab</strong> module's single generic container. The tab container replaces all of these design paradigms with one component that is very flexible and responsive in order to let you present your website or app's content any way you like. Tabbed navigation is very easy to implement, while collapse, accordion and carousel components use the stacked architecture of tabs. As usual, the tab container is responsive and accessible, allowing you to deliver your content properly to all devices and users.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>tab</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Basic syntax</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div class="tabs" style="margin-top: 5px; margin-bottom: 5px;">
<input type="radio" name="tabdemo" id="tab1" checked aria-hidden="true">
<label for="tab1" aria-hidden="true">Tab 1</label>
<div> <h3>Tab 1</h3> <p>This is the first tab's content.</p> </div>
<input type="radio" name="tabdemo" id="tab2" aria-hidden="true">
<label for="tab2" aria-hidden="true">Tab 2</label>
<div> <h3>Tab 2</h3> <p>This is the second tab's content.</p> </div>
<input type="radio" name="tabdemo" id="tab3" aria-hidden="true">
<label for="tab3" aria-hidden="true">Tab 3</label>
<div> <h3>Tab 3</h3> <p>This is the third tab's content.</p> </div>
<input type="radio" name="tabdemo" id="tab4" aria-hidden="true">
<label for="tab4" aria-hidden="true">Tab 4</label>
<div> <h3>Tab 4</h3> <p>This is the fourth tab's content.</p> </div>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>The tab container's basic sytanx is composed of two components, presented below in the order they should be added to the DOM tree:</p>
<ul>
<li>At the outermost level of the tab container is a <code>&lt;div&gt;</code> element implementing the <code>.tabs</code> class. This serves as the wrapper of the tab container.</li>
<li>Inside the <code>.tabs</code> container, add a set of the following three elements for each tab:
<ol>
<li>First, add an <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">&quot;radio&quot;</span>&gt;</code> element. Give it a <code><span class="fore-secondary">name</span></code> and an <code><span class="fore-secondary">id</span></code> in order to be able to link to it and group it with the rest of the radio buttons in the container.</li>
<li>Follow the <code>&lt;input&gt;</code> element with a <code>&lt;label&gt;</code> element linking to it. Inside this element, add the text you want to be shown as the title of your tab.</li>
<li>Finally, add a <code>&lt;div&gt;</code> immediately after the <code>&lt;label&gt;</code>'s closing tag. This will be the panel that contains the tab's content. Inside this element, you can add all the content you want in your tab (headings, images, text).</li>
</ol>
</li>
</ul>
<p>Tabs are responsive and will collapse into a stacked display on smaller screens, allowing the user to view the actual content more easily. The tab container's syntax is accessible, but parts of it might confuse screen readers, so we suggest adding the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">&quot;true&quot;</span></code> attribute to all the <code>&lt;input&gt;</code> and <code>&lt;label&gt;</code> elements inside the <code>.tabs</code> container.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;tabs&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab1&quot; aria-hidden=&quot;true&quot;&gt;Tab 1&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Tab 1&lt;/h3&gt;
&lt;p&gt;This is the first tab's content.&lt;/p&gt;
&lt;/div&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab2&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab2&quot; aria-hidden=&quot;true&quot;&gt;Tab 2&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Tab 2&lt;/h3&gt;
&lt;p&gt;This is the second tab's content.&lt;/p&gt;
&lt;/div&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab3&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab3&quot; aria-hidden=&quot;true&quot;&gt;Tab 3&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Tab 3&lt;/h3&gt;
&lt;p&gt;This is the third tab's content.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Tabs are compatible with modern browsers, but might not display properly in older browsers.</li>
<li>Remember to add the <code><span class="fore-secondary">checked</span></code> attribute to one of your <code>&lt;input&gt;</code>s if you want that tab to be the one displayed by default. If none is specified, the first one will be displayed.</li>
<li>The <code>height</code> of the tab container's panel area is <code>400px</code>. If you want to change this default size, please check out the <a href="customization.html">customization</a> page.</li>
<li>Using the method described above for making tabs accessible, screen readers will ignore tab controls and only read the content of tabs.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;tabs&quot;&gt;
&lt;input type=&quot;checkbox&quot; name=&quot;tab-group&quot; id=&quot;tab1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab1&quot; aria-hidden=&quot;true&quot;&gt;Tab 1&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Bad Tab&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Do not use checkboxes inside the default <code>.tabs</code> container, otherwise you might notice unexpected behavior. If you want to use an <code>&lt;input <span class="fore-secondary">type</span>=<span class="fore-primary">&quot;checkbox&quot;</span>&gt;</code>, check out the next section.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;tabs&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab1&quot; aria-hidden=&quot;true&quot;&gt;Tab 1&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Lonely Tab&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;You can add a single tab in a <code>.tabs</code> container, but what use would that be? You should probably read the next section to see what you can do with a stacked tab container instead.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;tabs&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab1&quot; aria-hidden=&quot;true&quot;&gt;Tab 1&lt;/label&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab2&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;tab2&quot; aria-hidden=&quot;true&quot;&gt;Tab 2&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Bad Tab&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;Bad Tab&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;The syntax and structure of the tab container is very strict. Try to follow it exactly as described in this section.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;tabs&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;tab-group&quot; id=&quot;tab1&quot; checked&gt;
&lt;label for=&quot;tab1&quot;&gt;Tab&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Not fully accessible tab&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Remember to use the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">&quot;true&quot;</span></code> attribute to make your tabs fully accessible.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Stacked tabs</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div class="tabs stacked" style="margin-top: 5px; margin-bottom: 5px;">
<input type="radio" name="accordion" id="a1" autocomplete="off" checked aria-hidden="true">
<label for="a1" aria-hidden="true">Accordion section 1</label>
<div> <h3>Section 1</h3> <p>This is the first accordion section's content.</p> </div>
<input type="radio" name="accordion" id="a2" autocomplete="off" aria-hidden="true">
<label for="a2" aria-hidden="true">Accordion section 2</label>
<div> <h3>Section 2</h3> <p>This is the second accordion section's content.</p> </div>
</div>
<div class="tabs stacked" style="margin-top: 5px; margin-bottom: 5px;">
<input type="checkbox" id="c1" autocomplete="off" aria-hidden="true">
<label for="c1" aria-hidden="true">Collapse section 1</label>
<div> <p>This is the first collapse section's content.</p> </div>
<input type="checkbox" id="c2" autocomplete="off" aria-hidden="true">
<label for="c2" aria-hidden="true">Collapse section 2</label>
<div> <p>This is the second collapse section's content.</p> </div>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Apart from the normal tab layout, you can make your tabs stacked instead, using the <code>.stacked</code> class in your <code>.tabs</code> container element. Stacked tabs are more versatile, allowing you to use checkboxes and/or radio buttons to implement collapses, accordions and spoilers. Carousel-styled elements can also be displayed in this fashion, if you wish. Remember to use the <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">&quot;true&quot;</span></code> attribute to make your tabs fully accessible, as before.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;tabs stacked&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;accordion&quot; id=&quot;a1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;a1&quot; aria-hidden=&quot;true&quot;&gt;Accordion section 1&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Section 1&lt;/h3&gt;
&lt;p&gt;This is the first accordion section's content.&lt;/p&gt;
&lt;/div&gt;
&lt;input type=&quot;radio&quot; name=&quot;accordion&quot; id=&quot;a2&quot;aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;a2&quot; aria-hidden=&quot;true&quot;&gt;Accordion section 2&lt;/label&gt;
&lt;div&gt;
&lt;h3&gt;Section 2&lt;/h3&gt;
&lt;p&gt;This is the second accordion section's content.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;tabs stacked&quot;&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;c1&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;c1&quot; aria-hidden=&quot;true&quot;&gt;Collapse section 1&lt;/label&gt;
&lt;div&gt;
&lt;p&gt;This is the first collapse section's content.&lt;/p&gt;
&lt;/div&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;c2&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;c2&quot; aria-hidden=&quot;true&quot;&gt;Collapse section 2&lt;/label&gt;
&lt;div&gt;
&lt;p&gt;This is the second collapse section's content.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li><code>.stacked</code> tabs can be used with either checkboxes or radio buttons.</li>
<li>You can mix and match checkboxes and radio buttons, but we suggest you do not do so, unless you think it is necessary for your design.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;div class=&quot;tabs stacked&quot;&gt;
&lt;input type=&quot;checkbox&quot; id=&quot;c1&quot; aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;c1&quot; aria-hidden=&quot;true&quot;&gt;Single collapse&lt;/label&gt;
&lt;div&gt;
&lt;p&gt;This is a singular collapse.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can implement single collapses (otherwise known as spoilers), using a <code>.tabs</code><code>.stacked</code> container with only one checkbox-based tab.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;div class=&quot;tabs stacked&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;accordion&quot; id=&quot;a1&quot; checked aria-hidden=&quot;true&quot;&gt;
&lt;label for=&quot;a1&quot; aria-hidden=&quot;true&quot;&gt;Single accordion section&lt;/label&gt;
&lt;div&gt;
&lt;p&gt;This accordion section cannot close once opened&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid having a single radio-based tab in a <code>.tabs</code><code>.stacked</code> container, as this might result in unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

View file

@ -1,401 +1,401 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Table</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, table ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #bdbdbd;}
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5; } header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
table#carded { border-collapse: collapse;border: 0;width: 100%; box-shadow: none; }
table#carded thead, table#carded th { border: 0;height: 1px;width: 1px; margin: -1px; overflow: hidden; padding: 0;position: absolute;clip: rect(0 0 0 0); -webkit-clip-path: inset(100%); clip-path: inset(100%); }
table#carded tr {display: block;border: 1px solid #bdbdbd;box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 2px 3px rgba(0, 0, 0, 0.15);background: #fafafa;margin-bottom: 10px; }
table#carded td {display: block;border: 0; border-bottom: 1px solid #bdbdbd; text-align: right; }
table#carded td:before { content: attr(data-label); float: left; font-weight: 700; }
table#carded td:last-child { border-bottom: 0; } .border-fix > td, .border-fix > th { border-top: 0; }
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Table</h1>
<p>The <strong>table</strong> module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Table</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Presenting information the right way is very important, especially so when dealing with large amounts of data. The <strong>table</strong> module reinvents tabular data presentation, using modern styling and responsiveness to help make tables fun again for all users no matter the device size. Tables can be either vertical or horizontal, both collapsing to a card view on smaller devices, so that they are easier to view properly. Horizontal tables are also flexible, allowing you to take as little space as possible, while still providing your users with a pleasant way to view their data. Finally, like in most CSS frameworks nowadays, you can stripe your tables to make reading them slightly less tiresome for your users' eyes. Note that all of the table variants are fully accessible.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>table</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Basic syntax &amp; responsiveness</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<h4>Medium/Large screen layout</h4><hr>
<table class="preset">
<caption>People</caption>
<thead>
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
</thead>
<tbody>
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
</tbody>
</table>
<br>
<h4>Small screen layout</h4><hr>
<table id="carded">
<caption>People</caption>
<thead>
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
</thead>
<tbody>
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
</tbody>
</table>
<br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Table layout utilizes the <code>&lt;table&gt;</code> HTML element with the following structure (usual tabular structure):</p>
<ol>
<li>On the outermost level, there is the <code>&lt;table&gt;</code> element.</li>
<li>If you want to include a <code>&lt;caption&gt;</code> element, it must by the first element inside the <code>&lt;table&gt;</code> element.</li>
<li>Following the above, you need to add a <code>&lt;thead&gt;</code> element. Inside it, you should usually add one <code>&lt;tr&gt;</code> element, which contains one or more <code>&lt;th&gt;</code> elements.</li>
<li>Immediately after the <code>&lt;thead&gt;</code> element, you can add a <code>&lt;tfoot&gt;</code> element, if you want to. Inside it, you should usually add one or more <code>&lt;tr&gt;</code> elements, which contain one or more <code>&lt;td&gt;</code> elements. </li>
<li>Finally, add your <code>&lt;tbody&gt;</code> element. Inside it, you should usually add one or more <code>&lt;tr&gt;</code> elements, which contain one or more <code>&lt;td&gt;</code> elements. For each <code>&lt;td&gt;</code> element, specify a <code>data-label</code> attribute equal to the heading of the column. This enables responsibility for your table, so that the values in the columns will be properly labeled on mobile devices.</li>
</ol>
<h3>Sample code</h3>
<pre>&lt;table&gt;
&lt;caption&gt;People&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Surname&lt;/th&gt;
&lt;th&gt;Alias&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Chad&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Wilberts&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;MrOne&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Adam&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Smith&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;TheSmith&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Sophia&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Canderson&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;Candee&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Tables are responsive by default and will change to a card-like view below a certain screen width. If you'd rather not make them responsive, check the last section on this page.</li>
<li>Specifying the <code>data-label</code> attribute is essential for the responsive version of a table to display properly. You can, however, use a value different from the column's name. Make sure it does not confuse your users, though.</li>
<li>We strongly suggest you avoid adding multiple rows in your <code>&lt;thead&gt;</code> element, as it could cause problems with accessibility. However, if you absolutely must, you might want to check <a href="http://codepen.io/chalarangelo/pen/VPqWQE">this codepen</a> for an idea on how to deal with irregular border styling.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;tr&gt;
&lt;td&gt;Chad&lt;/td&gt;
&lt;td&gt;Wilberts&lt;/td&gt;
&lt;td&gt;MrOne&lt;/td&gt;
&lt;/tr&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Remember to always add a <code>data-label</code> attribute to your <code>&lt;td&gt;</code> elements, as the table's card view is very dependent on them to display properly. <code>&lt;th&gt;</code> elements, however, do not require or utilize this attribute.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;table&gt;
&lt;caption&gt;People&lt;/caption&gt;
&lt;thead&gt;
<span class="fore-secondary">&lt;!-- ... --&gt;</span>
&lt;/thead&gt;
&lt;tbody&gt;
<span class="fore-secondary">&lt;!-- ... --&gt;</span>
&lt;/tbody&gt;
&lt;tfoot&gt;
<span class="fore-secondary">&lt;!-- ... --&gt;</span>
&lt;/tfoot&gt;
&lt;/table&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;The <code>&lt;tfoot&gt;</code> element must always be immediately after the <code>&lt;thead&gt;</code> element, if included.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;td data-label=&quot;Name&quot;&gt;Chad&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid inserting <code>&lt;th&gt;</code> elements inside your <code>&lt;tbody&gt;</code> element. If you want to make your tables horizontal or preset their styling in a manner different from the one shown in the previous examples, check the below sections.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;thead&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Chad&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using <code>&lt;td&gt;</code> elements inside your <code>&lt;thead&gt;</code>. You should use a <code>&lt;tbody&gt;</code> element instead.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Horizontal tables</h2>
</div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<br><table class="horizontal preset">
<caption>People</caption>
<thead>
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
</thead>
<tbody>
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
<tr><td data-label="Name">Nick</td><td data-label="Surname">Thomson</td><td data-label="Alias">NickThom</td></tr>
</tbody>
</table><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Horizontal tables can be created, by simply adding the <code>.horizontal</code> class to the root element of your table (i.e. the <code>&lt;table&gt;</code> element). Horizontal tables are flexible, so they can accommodate any amount of data rows and, if there is a lot of data, they will make their overflow scrollable. Remember to add the <code>data-label</code> attribute, as shown in the previous section, to allow your tables to be responsive without any errors. Keep in mind, however, that <code>.horizontal</code> tables do not support the <code>&lt;tfoot&gt;</code> element.</p>
<h3>Sample code</h3>
<pre>&lt;table class=&quot;horizontal&quot;&gt;
&lt;caption&gt;People&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Surname&lt;/th&gt;
&lt;th&gt;Alias&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Chad&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Wilberts&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;MrOne&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Adam&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Smith&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;TheSmith&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Sophia&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Canderson&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;Candee&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Due to <code>.horizontal</code> tables utilizing the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox Layout</a>, some older browsers may not properly display these tables. This is especially true with legacy versions of Internet Explorer.</li>
<li>Mixing the Flexible Layout Module with <code>&lt;table&gt;</code> elements seems to upset some browsers. We noticed this on an older mobile version of Firefox, where our implementation should work in theory, given the fact that both features are properly supported. If you notice any problems with <code>.horizontal</code> tables, feel free to <a href="https://github.com/Chalarangelo/mini.css/issues/new">submit a new issue on Github</a>.</li>
</ul>
<hr>
<div class="row">
<div class="col-sm-12">
<pre>&lt;table&gt;
<span class="fore-secondary">&lt;!-- ... --&gt;</span>
&lt;tfoot&gt;
<span class="fore-secondary">&lt;!-- ... --&gt;</span>
&lt;/tfoot&gt;
&lt;/table&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;We already explicitly stated that, due to the way <code>.horizontal</code> tables are styled, the <code>&lt;tfoot&gt;</code> element is not supported. Please refer to the next section if you need to use this element and you want to have a horizontal table layout.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Table variants &amp; matrices</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><br>
<table class="preset">
<caption>Star Wars Character Alignment Table</caption>
<tbody>
<tr class="border-fix"><th></th><th>Lawful</td><th>Neutral</td><th>Chaotic</td></tr>
<tr><th>Good</th><td>Yoda</td><td>Luke Skywalker</td><td>Chewbacca</td></tr>
<tr><th>Neutral</th><td>C-3PO</td><td>Boba Fett</td><td>Han Solo</td></tr>
<tr><th>Bad</th><td>Darth Vader</td><td>Emperor Palpatine</td><td>Jabba the Hutt</td></tr>
</tbody>
</table><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Tables are responsive by default, however you can disable this functionality for one or more tables (normal or <code>.horizontal</code>), using the <code>.preset</code> class. This class can also be used for a multitude of things, like dealing with tables not allowing you to have <code>&lt;th&gt;</code> elements inside the <code>&lt;tbody&gt;</code> element, building matrices (i.e. tables with a header column and a header row) etc. Finally, you can make your tables use a different color for every other row, using the <code>.striped</code> class.</p>
<h3>Sample code</h3>
<p>The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on <strong>Show sample code</strong> below to see the code sample for this example. By the way, we present a sample for a matrix table in he first example, but you can use the same principles and classes to create any table layout you wish.</p><br>
<div class="container"><div class="row"><div class="tabs stacked">
<input type="checkbox" id="grid-base-sample" autocomplete="off">
<label for="grid-base-sample">Show sample code</label>
<div>
<pre>&lt;table class=&quot;preset&quot;&gt;
&lt;caption&gt;Star Wars Character Alignment Table&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Lawful&lt;/td&gt;
&lt;th&gt;Neutral&lt;/td&gt;
&lt;th&gt;Chaotic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Good&lt;/th&gt;
&lt;td&gt;Yoda&lt;/td&gt;
&lt;td&gt;Luke Skywalker&lt;/td&gt;
&lt;td&gt;Chewbacca&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Neutral&lt;/th&gt;
&lt;td&gt;C-3PO&lt;/td&gt;
&lt;td&gt;Boba Fett&lt;/td&gt;
&lt;td&gt;Han Solo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Bad&lt;/th&gt;
&lt;td&gt;Darth Vader&lt;/td&gt;
&lt;td&gt;Emperor Palpatine&lt;/td&gt;
&lt;td&gt;Jabba the Hutt&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table class=&quot;striped&quot;&gt;
&lt;caption&gt;People&lt;/caption&gt;
&lt;thead&gt;
<span class="fore-primary">&lt;!-- ... --&gt;</span>
&lt;/thead&gt;
&lt;tbody&gt;
<span class="fore-primary">&lt;!-- ... --&gt;</span>
&lt;/tbody&gt;
&lt;/table&gt;</pre></div></div></div></div><br>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Making a table <code>.striped</code> also affects the color of the cards in their responsive view on mobile devices.</li>
<li>If you create a <code>.preset</code> table, which you do not want to alter via Javascript to be responsive at any time in the future, you can omit the <code>data-label</code> attributes.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;style&gt;
.border-fix &gt; td, .border-fix &gt; th {
border-top: 0;
}
&lt;/style&gt;
&lt;table class=&quot;preset&quot;&gt;
&lt;tbody&gt;
&lt;tr class=&quot;border-fix&quot;&gt;
<span class="fore-tertiary">&lt;!-- ... --&gt;</span>
&lt;/tr&gt;
<span class="fore-tertiary">&lt;!-- ... --&gt;</span>
&lt;/tbody&gt;
&lt;/table&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;The first row in a preset matrix table or any table without a <code>&lt;thead&gt;</code> element will have an extra border at the top. You can use a generic class to set <code>border-to: 0;</code> for the elements inside that row to fix this.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;table class=&quot;horizontal preset&quot;&gt;
<span class="fore-tertiary">&lt;!-- ... -&gt;</span>
&lt;/table&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;table class=&quot;horizontal striped&quot;&gt;
<span class="fore-tertiary">&lt;!-- ... -&gt;</span>
&lt;/table&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;table class=&quot;preset striped&quot;&gt;
<span class="fore-tertiary">&lt;!-- ... -&gt;</span>
&lt;/table&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;table class=&quot;preset horizontal striped&quot;&gt;
<span class="fore-tertiary">&lt;!-- ... -&gt;</span>
&lt;/table&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can combine any two of the following classes without any problems: <code>.horizontal</code>, <code>.preset</code>, <code>.striped</code>. Just make sure you respect each one's specific rules.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Table</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, table ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #e53935; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal {box-sizing: border-box;border-right: 1px solid #bdbdbd;}
@media (max-width: 767px){.col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #689f38; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored {color: #f5f5f5; } header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
table#carded { border-collapse: collapse;border: 0;width: 100%; box-shadow: none; }
table#carded thead, table#carded th { border: 0;height: 1px;width: 1px; margin: -1px; overflow: hidden; padding: 0;position: absolute;clip: rect(0 0 0 0); -webkit-clip-path: inset(100%); clip-path: inset(100%); }
table#carded tr {display: block;border: 1px solid #bdbdbd;box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 2px 3px rgba(0, 0, 0, 0.15);background: #fafafa;margin-bottom: 10px; }
table#carded td {display: block;border: 0; border-bottom: 1px solid #bdbdbd; text-align: right; }
table#carded td:before { content: attr(data-label); float: left; font-weight: 700; }
table#carded td:last-child { border-bottom: 0; } .border-fix > td, .border-fix > th { border-top: 0; }
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Table</h1>
<p>The <strong>table</strong> module provides styling and responsiveness for tables. Simple rules and accessible design paradigms have been used to make creating tables quick and easy. Large tables will collapse to cards when on smaller devices or, if you don't want that, they can be locked into their default, desktop view.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Table</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Presenting information the right way is very important, especially so when dealing with large amounts of data. The <strong>table</strong> module reinvents tabular data presentation, using modern styling and responsiveness to help make tables fun again for all users no matter the device size. Tables can be either vertical or horizontal, both collapsing to a card view on smaller devices, so that they are easier to view properly. Horizontal tables are also flexible, allowing you to take as little space as possible, while still providing your users with a pleasant way to view their data. Finally, like in most CSS frameworks nowadays, you can stripe your tables to make reading them slightly less tiresome for your users' eyes. Note that all of the table variants are fully accessible.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>table</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Basic syntax &amp; responsiveness</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<h4>Medium/Large screen layout</h4><hr>
<table class="preset">
<caption>People</caption>
<thead>
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
</thead>
<tbody>
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
</tbody>
</table>
<br>
<h4>Small screen layout</h4><hr>
<table id="carded">
<caption>People</caption>
<thead>
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
</thead>
<tbody>
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
</tbody>
</table>
<br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Table layout utilizes the <code>&lt;table&gt;</code> HTML element with the following structure (usual tabular structure):</p>
<ol>
<li>On the outermost level, there is the <code>&lt;table&gt;</code> element.</li>
<li>If you want to include a <code>&lt;caption&gt;</code> element, it must by the first element inside the <code>&lt;table&gt;</code> element.</li>
<li>Following the above, you need to add a <code>&lt;thead&gt;</code> element. Inside it, you should usually add one <code>&lt;tr&gt;</code> element, which contains one or more <code>&lt;th&gt;</code> elements.</li>
<li>Immediately after the <code>&lt;thead&gt;</code> element, you can add a <code>&lt;tfoot&gt;</code> element, if you want to. Inside it, you should usually add one or more <code>&lt;tr&gt;</code> elements, which contain one or more <code>&lt;td&gt;</code> elements. </li>
<li>Finally, add your <code>&lt;tbody&gt;</code> element. Inside it, you should usually add one or more <code>&lt;tr&gt;</code> elements, which contain one or more <code>&lt;td&gt;</code> elements. For each <code>&lt;td&gt;</code> element, specify a <code>data-label</code> attribute equal to the heading of the column. This enables responsibility for your table, so that the values in the columns will be properly labeled on mobile devices.</li>
</ol>
<h3>Sample code</h3>
<pre>&lt;table&gt;
&lt;caption&gt;People&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Surname&lt;/th&gt;
&lt;th&gt;Alias&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Chad&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Wilberts&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;MrOne&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Adam&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Smith&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;TheSmith&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Sophia&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Canderson&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;Candee&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Tables are responsive by default and will change to a card-like view below a certain screen width. If you'd rather not make them responsive, check the last section on this page.</li>
<li>Specifying the <code>data-label</code> attribute is essential for the responsive version of a table to display properly. You can, however, use a value different from the column's name. Make sure it does not confuse your users, though.</li>
<li>We strongly suggest you avoid adding multiple rows in your <code>&lt;thead&gt;</code> element, as it could cause problems with accessibility. However, if you absolutely must, you might want to check <a href="http://codepen.io/chalarangelo/pen/VPqWQE">this codepen</a> for an idea on how to deal with irregular border styling.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;tr&gt;
&lt;td&gt;Chad&lt;/td&gt;
&lt;td&gt;Wilberts&lt;/td&gt;
&lt;td&gt;MrOne&lt;/td&gt;
&lt;/tr&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Remember to always add a <code>data-label</code> attribute to your <code>&lt;td&gt;</code> elements, as the table's card view is very dependent on them to display properly. <code>&lt;th&gt;</code> elements, however, do not require or utilize this attribute.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;table&gt;
&lt;caption&gt;People&lt;/caption&gt;
&lt;thead&gt;
<span class="fore-secondary">&lt;!-- ... --&gt;</span>
&lt;/thead&gt;
&lt;tbody&gt;
<span class="fore-secondary">&lt;!-- ... --&gt;</span>
&lt;/tbody&gt;
&lt;tfoot&gt;
<span class="fore-secondary">&lt;!-- ... --&gt;</span>
&lt;/tfoot&gt;
&lt;/table&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;The <code>&lt;tfoot&gt;</code> element must always be immediately after the <code>&lt;thead&gt;</code> element, if included.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;td data-label=&quot;Name&quot;&gt;Chad&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid inserting <code>&lt;th&gt;</code> elements inside your <code>&lt;tbody&gt;</code> element. If you want to make your tables horizontal or preset their styling in a manner different from the one shown in the previous examples, check the below sections.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;thead&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Chad&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using <code>&lt;td&gt;</code> elements inside your <code>&lt;thead&gt;</code>. You should use a <code>&lt;tbody&gt;</code> element instead.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Horizontal tables</h2>
</div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<br><table class="horizontal preset">
<caption>People</caption>
<thead>
<tr><th>Name</th><th>Surname</th><th>Alias</th></tr>
</thead>
<tbody>
<tr><td data-label="Name">Chad</td><td data-label="Surname">Wilberts</td><td data-label="Alias">MrOne</td></tr>
<tr><td data-label="Name">Adam</td><td data-label="Surname">Smith</td><td data-label="Alias">TheSmith</td></tr>
<tr><td data-label="Name">Sophia</td><td data-label="Surname">Canderson</td><td data-label="Alias">Candee</td></tr>
<tr><td data-label="Name">Nick</td><td data-label="Surname">Thomson</td><td data-label="Alias">NickThom</td></tr>
</tbody>
</table><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Horizontal tables can be created, by simply adding the <code>.horizontal</code> class to the root element of your table (i.e. the <code>&lt;table&gt;</code> element). Horizontal tables are flexible, so they can accommodate any amount of data rows and, if there is a lot of data, they will make their overflow scrollable. Remember to add the <code>data-label</code> attribute, as shown in the previous section, to allow your tables to be responsive without any errors. Keep in mind, however, that <code>.horizontal</code> tables do not support the <code>&lt;tfoot&gt;</code> element.</p>
<h3>Sample code</h3>
<pre>&lt;table class=&quot;horizontal&quot;&gt;
&lt;caption&gt;People&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Surname&lt;/th&gt;
&lt;th&gt;Alias&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Chad&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Wilberts&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;MrOne&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Adam&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Smith&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;TheSmith&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td data-label=&quot;Name&quot;&gt;Sophia&lt;/td&gt;
&lt;td data-label=&quot;Surname&quot;&gt;Canderson&lt;/td&gt;
&lt;td data-label=&quot;Alias&quot;&gt;Candee&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Due to <code>.horizontal</code> tables utilizing the <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">Flexbox Layout</a>, some older browsers may not properly display these tables. This is especially true with legacy versions of Internet Explorer.</li>
<li>Mixing the Flexible Layout Module with <code>&lt;table&gt;</code> elements seems to upset some browsers. We noticed this on an older mobile version of Firefox, where our implementation should work in theory, given the fact that both features are properly supported. If you notice any problems with <code>.horizontal</code> tables, feel free to <a href="https://github.com/Chalarangelo/mini.css/issues/new">submit a new issue on Github</a>.</li>
</ul>
<hr>
<div class="row">
<div class="col-sm-12">
<pre>&lt;table&gt;
<span class="fore-secondary">&lt;!-- ... --&gt;</span>
&lt;tfoot&gt;
<span class="fore-secondary">&lt;!-- ... --&gt;</span>
&lt;/tfoot&gt;
&lt;/table&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;We already explicitly stated that, due to the way <code>.horizontal</code> tables are styled, the <code>&lt;tfoot&gt;</code> element is not supported. Please refer to the next section if you need to use this element and you want to have a horizontal table layout.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Table variants &amp; matrices</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><br>
<table class="preset">
<caption>Star Wars Character Alignment Table</caption>
<tbody>
<tr class="border-fix"><th></th><th>Lawful</td><th>Neutral</td><th>Chaotic</td></tr>
<tr><th>Good</th><td>Yoda</td><td>Luke Skywalker</td><td>Chewbacca</td></tr>
<tr><th>Neutral</th><td>C-3PO</td><td>Boba Fett</td><td>Han Solo</td></tr>
<tr><th>Bad</th><td>Darth Vader</td><td>Emperor Palpatine</td><td>Jabba the Hutt</td></tr>
</tbody>
</table><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Tables are responsive by default, however you can disable this functionality for one or more tables (normal or <code>.horizontal</code>), using the <code>.preset</code> class. This class can also be used for a multitude of things, like dealing with tables not allowing you to have <code>&lt;th&gt;</code> elements inside the <code>&lt;tbody&gt;</code> element, building matrices (i.e. tables with a header column and a header row) etc. Finally, you can make your tables use a different color for every other row, using the <code>.striped</code> class.</p>
<h3>Sample code</h3>
<p>The sample code is a bit lengthy, so we hid it by default to make it easier for mobile device users to read this page. Click or tap on <strong>Show sample code</strong> below to see the code sample for this example. By the way, we present a sample for a matrix table in he first example, but you can use the same principles and classes to create any table layout you wish.</p><br>
<div class="container"><div class="row"><div class="tabs stacked">
<input type="checkbox" id="grid-base-sample" autocomplete="off">
<label for="grid-base-sample">Show sample code</label>
<div>
<pre>&lt;table class=&quot;preset&quot;&gt;
&lt;caption&gt;Star Wars Character Alignment Table&lt;/caption&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Lawful&lt;/td&gt;
&lt;th&gt;Neutral&lt;/td&gt;
&lt;th&gt;Chaotic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Good&lt;/th&gt;
&lt;td&gt;Yoda&lt;/td&gt;
&lt;td&gt;Luke Skywalker&lt;/td&gt;
&lt;td&gt;Chewbacca&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Neutral&lt;/th&gt;
&lt;td&gt;C-3PO&lt;/td&gt;
&lt;td&gt;Boba Fett&lt;/td&gt;
&lt;td&gt;Han Solo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Bad&lt;/th&gt;
&lt;td&gt;Darth Vader&lt;/td&gt;
&lt;td&gt;Emperor Palpatine&lt;/td&gt;
&lt;td&gt;Jabba the Hutt&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table class=&quot;striped&quot;&gt;
&lt;caption&gt;People&lt;/caption&gt;
&lt;thead&gt;
<span class="fore-primary">&lt;!-- ... --&gt;</span>
&lt;/thead&gt;
&lt;tbody&gt;
<span class="fore-primary">&lt;!-- ... --&gt;</span>
&lt;/tbody&gt;
&lt;/table&gt;</pre></div></div></div></div><br>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Making a table <code>.striped</code> also affects the color of the cards in their responsive view on mobile devices.</li>
<li>If you create a <code>.preset</code> table, which you do not want to alter via Javascript to be responsive at any time in the future, you can omit the <code>data-label</code> attributes.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;style&gt;
.border-fix &gt; td, .border-fix &gt; th {
border-top: 0;
}
&lt;/style&gt;
&lt;table class=&quot;preset&quot;&gt;
&lt;tbody&gt;
&lt;tr class=&quot;border-fix&quot;&gt;
<span class="fore-tertiary">&lt;!-- ... --&gt;</span>
&lt;/tr&gt;
<span class="fore-tertiary">&lt;!-- ... --&gt;</span>
&lt;/tbody&gt;
&lt;/table&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;The first row in a preset matrix table or any table without a <code>&lt;thead&gt;</code> element will have an extra border at the top. You can use a generic class to set <code>border-to: 0;</code> for the elements inside that row to fix this.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;table class=&quot;horizontal preset&quot;&gt;
<span class="fore-tertiary">&lt;!-- ... -&gt;</span>
&lt;/table&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;table class=&quot;horizontal striped&quot;&gt;
<span class="fore-tertiary">&lt;!-- ... -&gt;</span>
&lt;/table&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;table class=&quot;preset striped&quot;&gt;
<span class="fore-tertiary">&lt;!-- ... -&gt;</span>
&lt;/table&gt;
<span class="fore-tertiary">&lt;!-- or --&gt;</span>
&lt;table class=&quot;preset horizontal striped&quot;&gt;
<span class="fore-tertiary">&lt;!-- ... -&gt;</span>
&lt;/table&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can combine any two of the following classes without any problems: <code>.horizontal</code>, <code>.preset</code>, <code>.striped</code>. Just make sure you respect each one's specific rules.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

View file

@ -1,270 +1,270 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Utility</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, utility, helper, classes, utilities ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #b71c1c; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #bdbdbd; }
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #1b5e20; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored { color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Utility</h1>
<p>The <strong>utility</strong> module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Utility</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Every website or app has different needs and no CSS framework can predict them all. The <strong>utility</strong> module addresses this issue by providing you with a handful of utility and helper classes to make common, repetitive declarations easier. These classes include, but are not limited to, generic border styling and shadows, some responsive sizing and spacing utilities and a few other things, like a close icon, breadcrumbs styling and visiblity helpers for screen readers.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>utility</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Visibility helpers</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-first">
<p>You can hide content for all your users, using the default <code><span class="fore-secondary">hidden</span></code> attribute. However, we provide you with the <code>.hidden</code> class for the same purpose, as well as the <code>.visually-hidden</code> class which will make your content hidden, except for screen readers.</p>
<h3>Sample code</h3>
<pre>&lt;span class=&quot;hidden&quot;&gt;Hidden text&lt;/span&gt;
&lt;span class=&quot;visually-hidden&quot;&gt;Screen-reader-only text&lt;/span&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Both classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12">
<pre>&lt;span class=&quot;hidden visually-hidden&quot;&gt;Not a good idea&lt;/span&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using both classes at the same time. Instead, use <code>.hidden</code> to hide content for all users, <code>.visually-hidden</code> to hide it for non-screen-reader users or <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">&quot;true&quot;</span></code> to hide it for screen-reader-only users.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Generic borders &amp; shadows</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<br>
<p>This is a paragraph with a piece of <span class="bordered">bordered text</span>.</p>
<button class="bordered">Bordered button</button><button class="bordered primary">Bordered button</button><br>
<p><img src="http://placehold.it/200x200?text=rounded" class="rounded">&nbsp;&nbsp;<img src="http://placehold.it/200x200?text=circular" class="circular"></p><br>
<p><span class="shadow-none">No shadow</span>&nbsp;&nbsp;<span class="shadow-small">Small shadow</span>&nbsp;&nbsp;<span class="shadow-medium">Medium shadow</span>&nbsp;&nbsp;<span class="shadow-large">Large shadow</span></p><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Use the <code>.bordered</code> class to apply a generic black border with 25% opacity to any element. Apart from that you can use the <code>.rounded</code> and <code>.circular</code> classes to create generic border radiuses. Finally, you can use the <code>.shadow-small</code>, <code>.shadow-medium</code> and <code>.shadow-large</code> to add a generic <code><span class="fore-secondary">box-shadow</span></code> to any element, as well as the <code>.shadow-none</code> class to remove it entirely.</p>
<h3>Sample code</h3>
<pre>&lt;span class=&quot;bordered&quot;&gt;Bordered&lt;/span&gt;
&lt;span class=&quot;rounded&quot;&gt;Rounded&lt;/span&gt;
&lt;span class=&quot;circular&quot;&gt;Circular&lt;/span&gt;
&lt;span class=&quot;shadow-none&quot;&gt;No shadow&lt;/span&gt;
&lt;span class=&quot;shadow-small&quot;&gt;Small shadow&lt;/span&gt;
&lt;span class=&quot;shadow-medium&quot;&gt;Medium shadow&lt;/span&gt;
&lt;span class=&quot;shadow-large&quot;&gt;Large shadow&lt;/span&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>All of these classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
<li>The <code>.bordered</code> class was originally created with elements such as buttons in mind, to allow users highlighting certain elements in their designs, without having to change any default styles.</li>
<li>All of the above classes can be used with most modern HTML elements.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;span class=&quot;bordered rounded shadow-small&quot;&gt;Stylized element&lt;/span&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can combine a generic border with any border radius or shadow or even both.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;span class=&quot;rounded circular&quot;&gt;Bad radius&lt;/span&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;span class=&quot;shadow-small shadow-large&quot;&gt;Bad shadow&lt;/span&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid combining two classes of the same type (i.e. two radii or two shadow styles), as they might overwrite each other and cause unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Responsive sizing &amp; spacing classes</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-first">
<p>Helper classes for the <code>padding</code> and <code>margin</code> attributes are provided in the form of <code>.responsive-margin</code> and <code>.responsive-padding</code> classes. Both of these classes are responsive, allowing you to collapse the spacing and size of elements on different displays to make better use of the device's viewport.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;responsive-padding&quot;&gt;Responsive padding&lt;/div&gt;
&lt;div class=&quot;responsive-margin&quot;&gt;Responsive margin&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>If the default values of these classes are not suited to your needs, check out the <a href="customization.html">customization</a> page.</li>
<li>Both classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12">
<pre>&lt;div class=&quot;responsive-padding responsive-margin&quot;&gt;Responsive padding and margin&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use both of these classes to make certain element adapt to changes. This could be especially useful for certain grid layouts.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Breadcrumbs</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><br>
<ul class="breadcrumbs"> <li><a href="#">Root</a></li> <li><a href="#">Folder</a></li> <li>File</li> </ul><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Breadcrumbs are usually used to show the navigational hierarchy of pages or folders. To use them, simply create a <code>&lt;ul&gt;</code> element that implements the <code>.breadcrumbs</code> class. Inside this unordered list, add as many <code>&lt;li&gt;</code> elements as needed to show your hierarchy. You can add links to the list elements, as necessary.</p>
<h3>Sample code</h3>
<pre>&lt;ul class=&quot;breadcrumbs&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Root&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Folder&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;File&lt;/li&gt;
&lt;/ul&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The separators between breadcrumbs are added using some tricky CSS rules. Due to that, there might be a few browser versions or devices where you can see part of the seams between the element separators.</li>
<li>Breadcrumbs show a hierarchy, an ordered list. However, we do not use the <code>&lt;ol&gt;</code> element, as it might conflict with some custom styles we've seen people use.</li>
<li>If you want to add some accesibility to your breadcrumbs, you can add the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://www.w3.org/TR/wai-aria/roles#navigation">navigation</a>&quot;</span></code> attribute, although it is not required.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;ol class=&quot;breadcrumbs&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Does&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Not&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Work&lt;/li&gt;
&lt;/ol&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;The structure of the breadcrumb component prohibits the use of <code>&lt;ol&gt;</code> in place of the <code>&lt;ul&gt;</code> element.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;ul class=&quot;breadcrumbs&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Root&lt;/a&gt;
&lt;ul class=&quot;breadcrumbs&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Folder&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;File&lt;/li&gt;
&lt;/ul&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid nesting lists, breadcrumbs or a combination of the two inside the <code>.breadcrumbs</code> list, as this might cause unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Close icon</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<br>
<p style="text-align:center;">&nbsp;&nbsp;<span class="close"></span>&nbsp;&nbsp;</p>
<br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>To create a close icon, simply add an element implementing the <code>.close</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;span class=&quot;close&quot;&gt;&lt;/span&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The close icon behaves similar to a button when hovering over it or otherwise focusing or selecting it.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;div class=&quot;close&quot;&gt;&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use a handful of other HTML elements instead of the <code>&lt;span&gt;</code> element showcased in the example above, most commonly <code>&lt;div&gt;</code> elements.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;button class=&quot;close&quot;&gt;&lt;/button&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;If you want your close icon to behave like a button (i.e. register as a button on screen readers and have the required logic attached to it), you can apply the <code>.close</code> class to a <code>&lt;button&gt;</code> element instead. You can even apply any of the button color variant classes.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v2.1.0/dist/mini-default.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<title>mini.css - Utility</title>
<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, module, utility, helper, classes, utilities ">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<style>
#header-logo { position:relative; top: -4px; display: inline; height: 28px; width: 28px; margin-top: 4px; background: #558b2f; border-radius: 1px; padding: 4px; }
.box-centered { text-align: center; } .box-colored { background: #0277bd; border-radius: 2px; padding: 14px; margin-bottom: 8px; min-height: 14px;} .box-colored.red { background: #b71c1c; }
.box-centered > .card.fluid {-webkit-box-pack: start; -webkit-box-align: start; -webkit-justify-content: flex-start; justify-content: flex-start; -webkit-align-self: auto; align-self: auto; } [class^='col-'] .card.fluid { margin: 2px 0 20px; }
[class^='fore-'] { font-family: monospace, monospace;} .fore-primary { color: #0d47a1;} .fore-secondary { color: #b71c1c;} .fore-tertiary { color: #1b5e20;}
.col-sm-12.col-sm-last.col-md-4.col-md-normal { box-sizing: border-box; border-right: 1px solid #bdbdbd; }
@media (max-width: 767px){ .col-sm-12.col-sm-last.col-md-4.col-md-normal { border: 0; border-top: 1px solid #bdbdbd;}}
.box-colored.green { background: #1b5e20; } .do {border-top: 15px solid #689f38;padding-top: 10px;} .dont {border-top: 15px solid #e53935;padding-top: 10px;}
.box-colored { color: #f5f5f5;} header.sticky a.button {padding: 4px 6px; font-size: 0.95em;}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo"><img src="mini-logo.svg" id="header-logo">&nbsp;<span style="position: relative; top:-12px;"><span style="font-size: 1.35em;">m</span>ini<span style="font-size:0.65em; color: #558b2f;">.css</span></span></a>
<div style="display: inline; overflow: auto;">
<a href="index.html" class="button">Introduction</a> <a href="modules.html" class="button">Modules</a>
<a href="flavors.html" class="button">Flavors</a> <a href="customization.html" class="button">Customization</a>
<a href="quick_reference.html" class="button">Quick Reference</a>
<a href="https://github.com/Chalarangelo/mini.css" class="button"><i class="fa fa-github" aria-hidden="true" style="font-size: 1.4em; position: relative; bottom: -2px; margin-right: 2px;"></i>&nbsp;Github</a>
</div>
</header>
<header class="sticky" style="height:36px;">
<a href="core.html" class="button">Core</a> <a href="grid.html" class="button">Grid</a>
<a href="navigation.html" class="button">Navigation</a> <a href="input_control.html" class="button">Input Control</a>
<a href="table.html" class="button">Table</a> <a href="card.html" class="button">Card</a>
<a href="tab.html" class="button">Tab</a> <a href="contextual.html" class="button">Contextual</a>
<a href="progress.html" class="button">Progress</a> <a href="utility.html" class="button">Utility</a>
</header>
<!-- Insert your page content here-->
<main><div class="container">
<div class="row" style="padding-top: 40px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<h1>Utility</h1>
<p>The <strong>utility</strong> module contains all the utilities and helper classes that you might want when designing a website or application. They solve common design problems efficiently and provide you with generic rules you can easily apply everywhere.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<ul class="breadcrumbs"><li><a href="index.html">Home</a></li><li><a href="modules.html">Modules</a></li><li>Utility</li></ul>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section">
<h2>Quick overview</h2>
<p>Every website or app has different needs and no CSS framework can predict them all. The <strong>utility</strong> module addresses this issue by providing you with a handful of utility and helper classes to make common, repetitive declarations easier. These classes include, but are not limited to, generic border styling and shadows, some responsive sizing and spacing utilities and a few other things, like a close icon, breadcrumbs styling and visiblity helpers for screen readers.</p><br>
</div>
<div class="section">
<h2>Quick start</h2>
<p>To use the <strong>utility</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code>&lt;head&gt;</code> to utilize the viewport meta tag:</p><br>
<pre>&lt;<span class="fore-tertiary">meta</span> <span class="fore-secondary">name</span>=<span class="fore-primary">&quot;viewport&quot;</span> <span class="fore-secondary">content</span>=<span class="fore-primary">&quot;width=device-width, initial-scale=1&quot;</span>&gt;</pre><br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Visibility helpers</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-first">
<p>You can hide content for all your users, using the default <code><span class="fore-secondary">hidden</span></code> attribute. However, we provide you with the <code>.hidden</code> class for the same purpose, as well as the <code>.visually-hidden</code> class which will make your content hidden, except for screen readers.</p>
<h3>Sample code</h3>
<pre>&lt;span class=&quot;hidden&quot;&gt;Hidden text&lt;/span&gt;
&lt;span class=&quot;visually-hidden&quot;&gt;Screen-reader-only text&lt;/span&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>Both classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12">
<pre>&lt;span class=&quot;hidden visually-hidden&quot;&gt;Not a good idea&lt;/span&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid using both classes at the same time. Instead, use <code>.hidden</code> to hide content for all users, <code>.visually-hidden</code> to hide it for non-screen-reader users or <code><span class="fore-secondary">aria-hidden</span>=<span class="fore-primary">&quot;true&quot;</span></code> to hide it for screen-reader-only users.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Generic borders &amp; shadows</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<br>
<p>This is a paragraph with a piece of <span class="bordered">bordered text</span>.</p>
<button class="bordered">Bordered button</button><button class="bordered primary">Bordered button</button><br>
<p><img src="http://placehold.it/200x200?text=rounded" class="rounded">&nbsp;&nbsp;<img src="http://placehold.it/200x200?text=circular" class="circular"></p><br>
<p><span class="shadow-none">No shadow</span>&nbsp;&nbsp;<span class="shadow-small">Small shadow</span>&nbsp;&nbsp;<span class="shadow-medium">Medium shadow</span>&nbsp;&nbsp;<span class="shadow-large">Large shadow</span></p><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Use the <code>.bordered</code> class to apply a generic black border with 25% opacity to any element. Apart from that you can use the <code>.rounded</code> and <code>.circular</code> classes to create generic border radiuses. Finally, you can use the <code>.shadow-small</code>, <code>.shadow-medium</code> and <code>.shadow-large</code> to add a generic <code><span class="fore-secondary">box-shadow</span></code> to any element, as well as the <code>.shadow-none</code> class to remove it entirely.</p>
<h3>Sample code</h3>
<pre>&lt;span class=&quot;bordered&quot;&gt;Bordered&lt;/span&gt;
&lt;span class=&quot;rounded&quot;&gt;Rounded&lt;/span&gt;
&lt;span class=&quot;circular&quot;&gt;Circular&lt;/span&gt;
&lt;span class=&quot;shadow-none&quot;&gt;No shadow&lt;/span&gt;
&lt;span class=&quot;shadow-small&quot;&gt;Small shadow&lt;/span&gt;
&lt;span class=&quot;shadow-medium&quot;&gt;Medium shadow&lt;/span&gt;
&lt;span class=&quot;shadow-large&quot;&gt;Large shadow&lt;/span&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>All of these classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
<li>The <code>.bordered</code> class was originally created with elements such as buttons in mind, to allow users highlighting certain elements in their designs, without having to change any default styles.</li>
<li>All of the above classes can be used with most modern HTML elements.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;span class=&quot;bordered rounded shadow-small&quot;&gt;Stylized element&lt;/span&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can combine a generic border with any border radius or shadow or even both.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;span class=&quot;rounded circular&quot;&gt;Bad radius&lt;/span&gt;
<span class="fore-secondary">&lt;!-- or --&gt;</span>
&lt;span class=&quot;shadow-small shadow-large&quot;&gt;Bad shadow&lt;/span&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid combining two classes of the same type (i.e. two radii or two shadow styles), as they might overwrite each other and cause unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Responsive sizing &amp; spacing classes</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-first">
<p>Helper classes for the <code>padding</code> and <code>margin</code> attributes are provided in the form of <code>.responsive-margin</code> and <code>.responsive-padding</code> classes. Both of these classes are responsive, allowing you to collapse the spacing and size of elements on different displays to make better use of the device's viewport.</p>
<h3>Sample code</h3>
<pre>&lt;div class=&quot;responsive-padding&quot;&gt;Responsive padding&lt;/div&gt;
&lt;div class=&quot;responsive-margin&quot;&gt;Responsive margin&lt;/div&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>If the default values of these classes are not suited to your needs, check out the <a href="customization.html">customization</a> page.</li>
<li>Both classes utilize <code><span class="fore-secondary">!important</span></code> declarations, so be careful when and how to use them.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12">
<pre>&lt;div class=&quot;responsive-padding responsive-margin&quot;&gt;Responsive padding and margin&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use both of these classes to make certain element adapt to changes. This could be especially useful for certain grid layouts.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Breadcrumbs</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div><br>
<ul class="breadcrumbs"> <li><a href="#">Root</a></li> <li><a href="#">Folder</a></li> <li>File</li> </ul><br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>Breadcrumbs are usually used to show the navigational hierarchy of pages or folders. To use them, simply create a <code>&lt;ul&gt;</code> element that implements the <code>.breadcrumbs</code> class. Inside this unordered list, add as many <code>&lt;li&gt;</code> elements as needed to show your hierarchy. You can add links to the list elements, as necessary.</p>
<h3>Sample code</h3>
<pre>&lt;ul class=&quot;breadcrumbs&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Root&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Folder&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;File&lt;/li&gt;
&lt;/ul&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The separators between breadcrumbs are added using some tricky CSS rules. Due to that, there might be a few browser versions or devices where you can see part of the seams between the element separators.</li>
<li>Breadcrumbs show a hierarchy, an ordered list. However, we do not use the <code>&lt;ol&gt;</code> element, as it might conflict with some custom styles we've seen people use.</li>
<li>If you want to add some accesibility to your breadcrumbs, you can add the <code><span class="fore-secondary">role</span>=<span class="fore-primary">&quot;<a href="https://www.w3.org/TR/wai-aria/roles#navigation">navigation</a>&quot;</span></code> attribute, although it is not required.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;ol class=&quot;breadcrumbs&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Does&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Not&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Work&lt;/li&gt;
&lt;/ol&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;The structure of the breadcrumb component prohibits the use of <code>&lt;ol&gt;</code> in place of the <code>&lt;ul&gt;</code> element.</p>
</div>
<div class="col-sm-12 col-md-6 col-sm-last col-md-normal">
<pre>&lt;ul class=&quot;breadcrumbs&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Root&lt;/a&gt;
&lt;ul class=&quot;breadcrumbs&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Folder&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;File&lt;/li&gt;
&lt;/ul&gt;</pre>
<p class="dont"><mark class="secondary">Don't:</mark>&nbsp;Avoid nesting lists, breadcrumbs or a combination of the two inside the <code>.breadcrumbs</code> list, as this might cause unexpected behavior.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm col-lg-10 col-lg-offset-1">
<div class="card fluid">
<div class="section"><h2>Close icon</h2></div>
<div class="section row">
<div class="col-sm-12 col-sm-last col-md-4 col-md-normal">
<div>
<br>
<p style="text-align:center;">&nbsp;&nbsp;<span class="close"></span>&nbsp;&nbsp;</p>
<br>
</div>
</div>
<div class="col-sm-12 col-sm-first col-md-8 col-md-normal">
<p>To create a close icon, simply add an element implementing the <code>.close</code> class.</p>
<h3>Sample code</h3>
<pre>&lt;span class=&quot;close&quot;&gt;&lt;/span&gt;</pre>
</div>
</div>
<div class="section">
<h3>Notes</h3>
<ul>
<li>The close icon behaves similar to a button when hovering over it or otherwise focusing or selecting it.</li>
</ul><hr>
<div class="row">
<div class="col-sm-12 col-md-6">
<pre>&lt;div class=&quot;close&quot;&gt;&lt;/div&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;You can use a handful of other HTML elements instead of the <code>&lt;span&gt;</code> element showcased in the example above, most commonly <code>&lt;div&gt;</code> elements.</p>
</div>
<div class="col-sm-12 col-md-6">
<pre>&lt;button class=&quot;close&quot;&gt;&lt;/button&gt;</pre>
<p class="do"><mark class="tertiary">Do:</mark>&nbsp;If you want your close icon to behave like a button (i.e. register as a button on screen readers and have the required logic attached to it), you can apply the <code>.close</code> class to a <code>&lt;button&gt;</code> element instead. You can even apply any of the button color variant classes.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="padding-bottom: 20px; padding-top:20px;">
<div class="col-sm col-lg-10 col-lg-offset-1">
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <a href="modules.html">modules page</a> and choose another module to see its documentation.</p>
</div>
</div>
</div></main>
<!-- End of page content-->
<footer><strong>mini.css</strong> was designed and built with <i class="fa fa-heart-o" aria-hidden="true"></i> by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>
</body>
</html>

View file

@ -1,123 +1,123 @@
<!DOCTYPE html>
<html>
<head>
<title>mini.css - A minimal Sass-y responsive mobile-first style-agnostic CSS framework</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - A minimal Sass-y responsive mobile-first style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, responsive, framework, mobile first, style agnostic, Sass">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<link rel="icon" type="image/png" href="favicon.png">
<!-- For local testing only -->
<!-- <link rel="stylesheet" href="../flavors/mini-default.min.css"> -->
<!-- Correct link -->
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v1.1.0/flavors/mini-default.min.css">
<style>
.footer{background-color:#272727; color:#ddd;}
.footer a, .footer a:hover, .footer a:visited, .footer a:visited:hover, .footer a:active, .footer a:visited:active{color: #fff;}
.footer a:hover{text-decoration: underline;}
</style>
</head>
<body>
<input type="checkbox" class="hidden" id="nav-toggle" autocomplete="off" class="hidden">
<div class="nav fixed">
<a href="https://chalarangelo.github.io/mini.css"><span class="logo">&nbsp;<img src="favicon.png" style="height: 34px; width: auto; display: inline-block; vertical-align: middle;">&nbsp;mini.css&nbsp;</span></a>
<ul>
<li><a href="https://chalarangelo.github.io/mini.css/#why-mini-css" class="link">Introduction</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/#modules" class="link">Module overview</a></li>
<li><label class="link dropdown" for="menu-drop1">Module demos</label></li>
</ul>
<input type="checkbox" id="menu-drop1" class="dropdown" autocomplete="off"><div>
<ul>
<li><a href="https://chalarangelo.github.io/mini.css/modules#base" class="link">Base</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#grid" class="link">Responsive Grid</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#nav" class="link">Navigation</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#dropdown" class="link">Dropdowns</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#tab" class="link">Tabs</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#table" class="link">Tables</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#form" class="link">Forms</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#button" class="link">Buttons</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#label" class="link">Labels</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#modal" class="link">Modals</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#collapse" class="link">Collapse</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#progress" class="link">Progress Bars</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#carousel" class="link">Carousel</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#utility" class="link">Utilities &amp; Helper Classes</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#utility-extra" class="link">Utilities &amp; Experimental Classes</a></li>
</ul>
</div>
</div>
<label for="nav-toggle"></label>
<br>
<div class="grid-container">
<div class="row">
<div class="col xs-no md-1"></div>
<div class="col xs-12 md-10">
<h1>mini.css<small> a minimal Sass-y responsive mobile-first style-agnostic CSS framework</small></h1>
<p>If you want to create your own flavor, get involved or report an issue, head over to <strong>mini.css</strong>'s <a href="https://github.com/Chalarangelo/mini.css">Github repository</a> or the <a href="https://github.com/Chalarangelo/mini.css/wiki">wiki</a>. If you want to give <strong>mini.css</strong> a try using the default flavor, paste the following code inside your HTML page's <code>&lt;head&gt;</code> tag:</p>
<pre style="overflow: auto;">&lt;link rel=<span class="txt-green">&quot;stylesheet&quot;</span> href=<span class="txt-blue">&quot;https://cdn.rawgit.com/Chalarangelo/mini.css/v1.1.0/flavors/mini-default.min.css&quot;</span>&gt;</pre>
<p>If you'd rather use a package manager, <strong>mini.css</strong> is available in both Bower and NPM:</p>
<pre style="margin-left: 1px; border-left: 5px solid #3f84b3; border-top-left-radius: 0; border-bottom-left-radius: 0;"> <span class="txt-blue">bower install</span> mini.css</pre>
<pre style="margin-left: 1px; border-left: 5px solid #3f84b3; border-top-left-radius: 0; border-bottom-left-radius: 0;"> <span class="txt-blue">npm install</span> mini.css</pre><br>
<h2 id="why-mini-css">Why mini.css?</h2><hr>
<ul>
<li><strong>Size matters!</strong> - The key focus of <strong>mini.css</strong> is to provide developers with a very light framework to build their pages with. To accomplish this, we stripped down most of the commonly-used components to their essentials, utilising the magic of CSS. By building lighter components, using only CSS, we made <strong>mini.css</strong> really tiny, just under 5KB for the default flavor.</li>
<li><strong>Easily customize your pages!</strong> - <strong>mini.css</strong> does not rely on a huge monolithic CSS file to do everything. In fact, we split the framework into smaller modules using Sass(SCSS), so you can easily distinguish what pieces you want in your final stylesheet. But that's not all! Every single detail of the provided modules can be changed, from colors and border styles to class names and structure. It's all really simple and you can do it without a lot of CSS or Sass knowledge. These customized stylesheets are called <strong>flavors</strong> and are one of the key differences between <strong>mini.css</strong> and other frameworks.</li>
<li><strong>We are mobile-friendly!</strong><sup>*</sup> - That's right! We built <strong>mini.css</strong> from the ground up to support mobile devices as best as possible and be responsive. All of this functionality can be fully customized to suit your end-users.</li>
<li><strong>No Javascript!</strong> - As much as we all love Javascript, we tried to keep all of the modules in <strong>mini.css</strong> pure CSS. This means no dependencies on Javascript libraries or excessive code for events you might never use.</li>
</ul>
<small>(*): We do not want to claim that any website will ever instantly work 100% the way you want on mobile, but mini.css eliminates a lot of the tedious work of making your websites mobile-friendly, so you can focus on the interesting parts that actually need your attention.</small>
<h2 id="modules">What does it contain?</h2>
<p><strong>mini.css</strong> is split up into modules, each with a specific focus or set of components. These modules are categorized under core modules and extra modules. We suggest that you use most of the core modules in your projects, as most projects can make good use of them. As for the extra modules, we suggest you carefully pick the ones you need for your project. Below is a quick overview of all the modules:</p>
<ul>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#base">Core : Base</a></h3><p>A modified version of <a href="https://necolas.github.io/normalize.css/">normalize.css</a> combined with a long list of variables produces a customized base for your projects along with typography rules and colors.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#grid">Core : Responsive Grid</a></h3><p>A customizable reponsive grid that lets you build pages that look great on all devices wih minimal tweaking..</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#nav">Core : Navigation</a></h3><p>A customizable responsive navigation bar for your pages.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#dropdown">Extra : Navigation - Dropdown</a></h3><p>The navigation system can easily be extended using the dropdown component.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#tab">Extra : Navigation - Tabs</a></h3><p>If you would rather use tabs instead of the usual navigation bar, you can use this module to enable tabbed navigation.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#table">Core : Tables</a></h3><p>Give a fresh style to your tables without overloading your page.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#form">Core : Forms</a></h3><p>Simple, elegant and light forms that will work well and give feedback to the user.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#button">Core : Buttons</a></h3><p>Tiny button styles that allow you to beautify your buttons, labels and links.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#label">Extra : Labels &amp; Badges</a></h3><p>Small badges and labels to provide your user's with all the info they need.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#modal">Extra : Modals</a></h3><p>Modal dialog prompts to notify your users the easy way.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#collapse">Extra : Collapse</a></h3><p>Hide and show text using customizable collapse buttons.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#progress">Extra : Progress Bars</a></h3><p>A simple module that allows you to create progess bars for your pages.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#carousel">Extra : Carousel</a></h3><p>Really light and customizable imaage slideshow for all your showcase needs.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#utility">Core : Utilities &amp; Helper Classes</a></h3><p>Classes for generic borders, image thumbnails, contextual text coloring, utility buttons and more.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#utility-extra">Extra : Utilities &amp; Experimental Classes</a></h3><p>Breadcrumbs, containers, panels, alerts, popovers, button groups and more.</p></li>
</ul>
</div>
</div>
<div class="row footer">
<div class="col xs-no md-1"></div>
<div class="col xs-12 md-10 footer">
<p style="padding-top: 10px;"><strong>mini.css</strong> was designed and built by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</p>
</div>
</div>
</div>
</body>
<!DOCTYPE html>
<html>
<head>
<title>mini.css - A minimal Sass-y responsive mobile-first style-agnostic CSS framework</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="mini.css - A minimal Sass-y responsive mobile-first style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, responsive, framework, mobile first, style agnostic, Sass">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<link rel="icon" type="image/png" href="favicon.png">
<!-- For local testing only -->
<!-- <link rel="stylesheet" href="../flavors/mini-default.min.css"> -->
<!-- Correct link -->
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v1.1.0/flavors/mini-default.min.css">
<style>
.footer{background-color:#272727; color:#ddd;}
.footer a, .footer a:hover, .footer a:visited, .footer a:visited:hover, .footer a:active, .footer a:visited:active{color: #fff;}
.footer a:hover{text-decoration: underline;}
</style>
</head>
<body>
<input type="checkbox" class="hidden" id="nav-toggle" autocomplete="off" class="hidden">
<div class="nav fixed">
<a href="https://chalarangelo.github.io/mini.css"><span class="logo">&nbsp;<img src="favicon.png" style="height: 34px; width: auto; display: inline-block; vertical-align: middle;">&nbsp;mini.css&nbsp;</span></a>
<ul>
<li><a href="https://chalarangelo.github.io/mini.css/#why-mini-css" class="link">Introduction</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/#modules" class="link">Module overview</a></li>
<li><label class="link dropdown" for="menu-drop1">Module demos</label></li>
</ul>
<input type="checkbox" id="menu-drop1" class="dropdown" autocomplete="off"><div>
<ul>
<li><a href="https://chalarangelo.github.io/mini.css/modules#base" class="link">Base</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#grid" class="link">Responsive Grid</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#nav" class="link">Navigation</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#dropdown" class="link">Dropdowns</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#tab" class="link">Tabs</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#table" class="link">Tables</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#form" class="link">Forms</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#button" class="link">Buttons</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#label" class="link">Labels</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#modal" class="link">Modals</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#collapse" class="link">Collapse</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#progress" class="link">Progress Bars</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#carousel" class="link">Carousel</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#utility" class="link">Utilities &amp; Helper Classes</a></li>
<li><a href="https://chalarangelo.github.io/mini.css/modules#utility-extra" class="link">Utilities &amp; Experimental Classes</a></li>
</ul>
</div>
</div>
<label for="nav-toggle"></label>
<br>
<div class="grid-container">
<div class="row">
<div class="col xs-no md-1"></div>
<div class="col xs-12 md-10">
<h1>mini.css<small> a minimal Sass-y responsive mobile-first style-agnostic CSS framework</small></h1>
<p>If you want to create your own flavor, get involved or report an issue, head over to <strong>mini.css</strong>'s <a href="https://github.com/Chalarangelo/mini.css">Github repository</a> or the <a href="https://github.com/Chalarangelo/mini.css/wiki">wiki</a>. If you want to give <strong>mini.css</strong> a try using the default flavor, paste the following code inside your HTML page's <code>&lt;head&gt;</code> tag:</p>
<pre style="overflow: auto;">&lt;link rel=<span class="txt-green">&quot;stylesheet&quot;</span> href=<span class="txt-blue">&quot;https://cdn.rawgit.com/Chalarangelo/mini.css/v1.1.0/flavors/mini-default.min.css&quot;</span>&gt;</pre>
<p>If you'd rather use a package manager, <strong>mini.css</strong> is available in both Bower and NPM:</p>
<pre style="margin-left: 1px; border-left: 5px solid #3f84b3; border-top-left-radius: 0; border-bottom-left-radius: 0;"> <span class="txt-blue">bower install</span> mini.css</pre>
<pre style="margin-left: 1px; border-left: 5px solid #3f84b3; border-top-left-radius: 0; border-bottom-left-radius: 0;"> <span class="txt-blue">npm install</span> mini.css</pre><br>
<h2 id="why-mini-css">Why mini.css?</h2><hr>
<ul>
<li><strong>Size matters!</strong> - The key focus of <strong>mini.css</strong> is to provide developers with a very light framework to build their pages with. To accomplish this, we stripped down most of the commonly-used components to their essentials, utilising the magic of CSS. By building lighter components, using only CSS, we made <strong>mini.css</strong> really tiny, just under 5KB for the default flavor.</li>
<li><strong>Easily customize your pages!</strong> - <strong>mini.css</strong> does not rely on a huge monolithic CSS file to do everything. In fact, we split the framework into smaller modules using Sass(SCSS), so you can easily distinguish what pieces you want in your final stylesheet. But that's not all! Every single detail of the provided modules can be changed, from colors and border styles to class names and structure. It's all really simple and you can do it without a lot of CSS or Sass knowledge. These customized stylesheets are called <strong>flavors</strong> and are one of the key differences between <strong>mini.css</strong> and other frameworks.</li>
<li><strong>We are mobile-friendly!</strong><sup>*</sup> - That's right! We built <strong>mini.css</strong> from the ground up to support mobile devices as best as possible and be responsive. All of this functionality can be fully customized to suit your end-users.</li>
<li><strong>No Javascript!</strong> - As much as we all love Javascript, we tried to keep all of the modules in <strong>mini.css</strong> pure CSS. This means no dependencies on Javascript libraries or excessive code for events you might never use.</li>
</ul>
<small>(*): We do not want to claim that any website will ever instantly work 100% the way you want on mobile, but mini.css eliminates a lot of the tedious work of making your websites mobile-friendly, so you can focus on the interesting parts that actually need your attention.</small>
<h2 id="modules">What does it contain?</h2>
<p><strong>mini.css</strong> is split up into modules, each with a specific focus or set of components. These modules are categorized under core modules and extra modules. We suggest that you use most of the core modules in your projects, as most projects can make good use of them. As for the extra modules, we suggest you carefully pick the ones you need for your project. Below is a quick overview of all the modules:</p>
<ul>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#base">Core : Base</a></h3><p>A modified version of <a href="https://necolas.github.io/normalize.css/">normalize.css</a> combined with a long list of variables produces a customized base for your projects along with typography rules and colors.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#grid">Core : Responsive Grid</a></h3><p>A customizable reponsive grid that lets you build pages that look great on all devices wih minimal tweaking..</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#nav">Core : Navigation</a></h3><p>A customizable responsive navigation bar for your pages.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#dropdown">Extra : Navigation - Dropdown</a></h3><p>The navigation system can easily be extended using the dropdown component.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#tab">Extra : Navigation - Tabs</a></h3><p>If you would rather use tabs instead of the usual navigation bar, you can use this module to enable tabbed navigation.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#table">Core : Tables</a></h3><p>Give a fresh style to your tables without overloading your page.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#form">Core : Forms</a></h3><p>Simple, elegant and light forms that will work well and give feedback to the user.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#button">Core : Buttons</a></h3><p>Tiny button styles that allow you to beautify your buttons, labels and links.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#label">Extra : Labels &amp; Badges</a></h3><p>Small badges and labels to provide your user's with all the info they need.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#modal">Extra : Modals</a></h3><p>Modal dialog prompts to notify your users the easy way.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#collapse">Extra : Collapse</a></h3><p>Hide and show text using customizable collapse buttons.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#progress">Extra : Progress Bars</a></h3><p>A simple module that allows you to create progess bars for your pages.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#carousel">Extra : Carousel</a></h3><p>Really light and customizable imaage slideshow for all your showcase needs.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#utility">Core : Utilities &amp; Helper Classes</a></h3><p>Classes for generic borders, image thumbnails, contextual text coloring, utility buttons and more.</p></li>
<li><h3><a href="https://chalarangelo.github.io/mini.css/modules#utility-extra">Extra : Utilities &amp; Experimental Classes</a></h3><p>Breadcrumbs, containers, panels, alerts, popovers, button groups and more.</p></li>
</ul>
</div>
</div>
<div class="row footer">
<div class="col xs-no md-1"></div>
<div class="col xs-12 md-10 footer">
<p style="padding-top: 10px;"><strong>mini.css</strong> was designed and built by <a href="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <a href="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <a href="https://github.com/Chalarangelo/mini.css">Github</a>.</p>
</div>
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,11 @@
<!DOCTYPE html><html><head>
<title>mini.css - Minimal, responsive, style-agnostic CSS framework</title><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, toolkit">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<meta http-equiv="refresh" content="0; url=https://chalarangelo.github.io/mini.css/">
</head></html>
<!DOCTYPE html><html><head>
<title>mini.css - Minimal, responsive, style-agnostic CSS framework</title><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta name="keywords" content="mini, mini.css, CSS, framework, minimal, responsive, style-agnostic, front-end, frontend, Sass, toolkit">
<meta name="author" content="Angelos Chalaris (chalarangelo)">
<meta property="og:title" content="mini.css - Minimal, responsive, style-agnostic CSS framework">
<meta property="og:description" content="mini.css is a tiny CSS framework designed to build quick, modern and responsive websites."/>
<meta property="og:type" content="website"/><meta property="og:image" content="page_thumb.PNG">
<meta property="og:url" content="https://chalarangelo.github.io/mini.css/"><link rel="icon" type="image/png" href="favicon.png">
<meta http-equiv="refresh" content="0; url=https://chalarangelo.github.io/mini.css/">
</head></html>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,164 +1,164 @@
/*
Definitions for cards and containers.
*/
// Dependency: This module depends heavily on the grid system module.
// Card styling
$card-name: 'card' !default; // Class name for the cards
$card-section-name: 'section' !default; // Class name for the cards' sections
$card-section-media-name: 'media' !default; // Class name for the cards' sections (media cotent)
$card-normal-width: 320px !default; // Width for normal cards
.#{$card-name} {
// Old syntax
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: justify;
-webkit-box-align: center;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-align-self: center;
align-self: center;
position: relative;
width: 100%;
// Actual styling for the cards
@if $card-back-color != $back-color {
background: $card-back-color;
}
@if $card-fore-color != $fore-color {
color: $card-fore-color;
}
@if $card-border-style != 0 {
border: $card-border-style;
}
@if $card-border-radius != 0 {
border-radius: $card-border-radius;
}
@if $card-margin != 0 {
margin: $card-margin;
}
// Tasteful shadow
@if $card-box-shadow != none {
box-shadow: $card-box-shadow;
}
// Card sections
& > .#{$card-section-name} {
box-sizing: border-box;
margin: 0;
border-bottom: $card-section-border-style;
padding: $card-section-padding;
width: 100%;
// Card media sections
&.#{$card-section-media-name} {
height: $card-section-media-height;
padding: 0;
-o-object-fit: cover;
object-fit: cover;
}
}
// Card input and button sections
& > button, .#{$button-class-name}, [role="button"], input {
&.#{$card-section-name} {
border-radius: 0; // Clean button and input gaps from border-radius
}
}
// Card sections - last
& > .#{$card-section-name}:last-child {
border-bottom: 0; // Clean the extra border for last section
}
}
// Responsiveness (if the screen is larger than card, set max-width)
@media (min-width: #{$card-normal-width}) {
.#{$card-name} {
max-width: $card-normal-width;
}
}
// Mixin for alternate card sizes.
// Variables:
// - $card-alt-size-name : The name of the class used for the alternate size card.
// - $card-alt-size-width : The width of the alternate size card.
@mixin make-card-alt-size ($card-alt-size-name, $card-alt-size-width) {
@if type-of($card-alt-size-width) == 'number' and unit($card-alt-size-width) == '%' {
.#{$card-name}.#{$card-alt-size-name} {
max-width: $card-alt-size-width;
width: auto;
}
}
@else {
@media (min-width: #{$card-alt-size-width}) {
.#{$card-name}.#{$card-alt-size-name} {
max-width: $card-alt-size-width;
}
}
}
}
// Mixin for alternate cards (card color variants).
// Variables:
// - $card-alt-name : The name of the class used for the alternate card.
// - $card-alt-back-color : The background color of the alternate card.
// - $card-alt-fore-color : The text color of the alternate card.
// - $card-alt-border-style : (Optional) The border style of the alternate card. Defaults to the value
// of $card-border-style.
// - $card-alt-border-radius : (Optional) The border radius of the alternate card. Defaults to the value
// of $card-border-radius.
// - $card-alt-section-border-style : (Optional) The border style of the alternate card's sections. Defaults to
// the value of $card-section-border-style.
@mixin make-card-alt-color ($card-alt-name, $card-alt-back-color, $card-alt-fore-color,
$card-alt-border-style : $card-border-style, $card-alt-border-radius : $card-border-radius,
$card-alt-section-border-style : $card-section-border-style) {
.#{$card-name}.#{$card-alt-name} {
@if $card-alt-back-color != $card-back-color {
background: $card-alt-back-color;
}
@if $card-alt-fore-color != $card-fore-color {
color: $card-alt-fore-color;
}
@if $card-alt-border-style != $card-border-style {
border: $card-alt-border-style;
}
@if $card-alt-border-radius != $card-border-radius {
border-radius: $card-alt-border-radius;
}
@if $card-alt-section-border-style != $card-section-border-style{
& > .#{$card-section-name} {
border-bottom: $card-alt-section-border-style;
}
& > .#{$card-section-name}:last-child {
border-bottom: 0; // Clean the extra border for last section
}
}
}
}
// Mixin for alternate card sections (card section color variants).
// Variables:
// - $card-section-alt-name : The name of the class used for the alternate card section.
// - $card-section-alt-back-color : The background color of the alternate card section.
// - $card-section-alt-fore-color : The text color of the alternate card section.
// - $card-section-alt-border-style : (Optional) The border style of the alternate card section. Defaults to
// the value of $card-section-border-style.
@mixin make-card-section-alt-color ($card-section-alt-name, $card-section-alt-back-color,
$card-section-alt-fore-color, $card-section-alt-border-style : $card-section-border-style) {
.#{$card-name} > .#{$card-section-name}.#{$card-section-alt-name} {
@if $card-section-alt-back-color != $card-back-color {
background: $card-section-alt-back-color;
}
@if $card-section-alt-fore-color != $card-fore-color {
color: $card-section-alt-fore-color;
}
@if $card-section-alt-border-style != $card-section-border-style {
border: $card-section-alt-border-style;
}
}
}
// Mixin for alternate card sections (card section padding variants).
// Variables:
// - $card-section-alt-name : The name of the class used for the alternate card section.
// - $card-section-alt-padding : The padding of the alternate card section.
@mixin make-card-section-alt-style ($card-section-alt-name, $card-section-alt-padding) {
.#{$card-name} > .#{$card-section-name}.#{$card-section-alt-name} {
padding: $card-section-alt-padding;
}
}
/*
Definitions for cards and containers.
*/
// Dependency: This module depends heavily on the grid system module.
// Card styling
$card-name: 'card' !default; // Class name for the cards
$card-section-name: 'section' !default; // Class name for the cards' sections
$card-section-media-name: 'media' !default; // Class name for the cards' sections (media cotent)
$card-normal-width: 320px !default; // Width for normal cards
.#{$card-name} {
// Old syntax
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: justify;
-webkit-box-align: center;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-align-self: center;
align-self: center;
position: relative;
width: 100%;
// Actual styling for the cards
@if $card-back-color != $back-color {
background: $card-back-color;
}
@if $card-fore-color != $fore-color {
color: $card-fore-color;
}
@if $card-border-style != 0 {
border: $card-border-style;
}
@if $card-border-radius != 0 {
border-radius: $card-border-radius;
}
@if $card-margin != 0 {
margin: $card-margin;
}
// Tasteful shadow
@if $card-box-shadow != none {
box-shadow: $card-box-shadow;
}
// Card sections
& > .#{$card-section-name} {
box-sizing: border-box;
margin: 0;
border-bottom: $card-section-border-style;
padding: $card-section-padding;
width: 100%;
// Card media sections
&.#{$card-section-media-name} {
height: $card-section-media-height;
padding: 0;
-o-object-fit: cover;
object-fit: cover;
}
}
// Card input and button sections
& > button, .#{$button-class-name}, [role="button"], input {
&.#{$card-section-name} {
border-radius: 0; // Clean button and input gaps from border-radius
}
}
// Card sections - last
& > .#{$card-section-name}:last-child {
border-bottom: 0; // Clean the extra border for last section
}
}
// Responsiveness (if the screen is larger than card, set max-width)
@media (min-width: #{$card-normal-width}) {
.#{$card-name} {
max-width: $card-normal-width;
}
}
// Mixin for alternate card sizes.
// Variables:
// - $card-alt-size-name : The name of the class used for the alternate size card.
// - $card-alt-size-width : The width of the alternate size card.
@mixin make-card-alt-size ($card-alt-size-name, $card-alt-size-width) {
@if type-of($card-alt-size-width) == 'number' and unit($card-alt-size-width) == '%' {
.#{$card-name}.#{$card-alt-size-name} {
max-width: $card-alt-size-width;
width: auto;
}
}
@else {
@media (min-width: #{$card-alt-size-width}) {
.#{$card-name}.#{$card-alt-size-name} {
max-width: $card-alt-size-width;
}
}
}
}
// Mixin for alternate cards (card color variants).
// Variables:
// - $card-alt-name : The name of the class used for the alternate card.
// - $card-alt-back-color : The background color of the alternate card.
// - $card-alt-fore-color : The text color of the alternate card.
// - $card-alt-border-style : (Optional) The border style of the alternate card. Defaults to the value
// of $card-border-style.
// - $card-alt-border-radius : (Optional) The border radius of the alternate card. Defaults to the value
// of $card-border-radius.
// - $card-alt-section-border-style : (Optional) The border style of the alternate card's sections. Defaults to
// the value of $card-section-border-style.
@mixin make-card-alt-color ($card-alt-name, $card-alt-back-color, $card-alt-fore-color,
$card-alt-border-style : $card-border-style, $card-alt-border-radius : $card-border-radius,
$card-alt-section-border-style : $card-section-border-style) {
.#{$card-name}.#{$card-alt-name} {
@if $card-alt-back-color != $card-back-color {
background: $card-alt-back-color;
}
@if $card-alt-fore-color != $card-fore-color {
color: $card-alt-fore-color;
}
@if $card-alt-border-style != $card-border-style {
border: $card-alt-border-style;
}
@if $card-alt-border-radius != $card-border-radius {
border-radius: $card-alt-border-radius;
}
@if $card-alt-section-border-style != $card-section-border-style{
& > .#{$card-section-name} {
border-bottom: $card-alt-section-border-style;
}
& > .#{$card-section-name}:last-child {
border-bottom: 0; // Clean the extra border for last section
}
}
}
}
// Mixin for alternate card sections (card section color variants).
// Variables:
// - $card-section-alt-name : The name of the class used for the alternate card section.
// - $card-section-alt-back-color : The background color of the alternate card section.
// - $card-section-alt-fore-color : The text color of the alternate card section.
// - $card-section-alt-border-style : (Optional) The border style of the alternate card section. Defaults to
// the value of $card-section-border-style.
@mixin make-card-section-alt-color ($card-section-alt-name, $card-section-alt-back-color,
$card-section-alt-fore-color, $card-section-alt-border-style : $card-section-border-style) {
.#{$card-name} > .#{$card-section-name}.#{$card-section-alt-name} {
@if $card-section-alt-back-color != $card-back-color {
background: $card-section-alt-back-color;
}
@if $card-section-alt-fore-color != $card-fore-color {
color: $card-section-alt-fore-color;
}
@if $card-section-alt-border-style != $card-section-border-style {
border: $card-section-alt-border-style;
}
}
}
// Mixin for alternate card sections (card section padding variants).
// Variables:
// - $card-section-alt-name : The name of the class used for the alternate card section.
// - $card-section-alt-padding : The padding of the alternate card section.
@mixin make-card-section-alt-style ($card-section-alt-name, $card-section-alt-padding) {
.#{$card-name} > .#{$card-section-name}.#{$card-section-alt-name} {
padding: $card-section-alt-padding;
}
}

View file

@ -1,337 +1,337 @@
/*
Definitions for contextual background elements and alerts.
*/
// Contextual background elements use the mark element as their base.
// Default styling for mark. Use mixins for alternate styles.
$mark-inline-block-name: 'inline-block' !default; // Class name for <mark> inline block styling
mark {
@if $mark-back-color != $back-color {
background: $mark-back-color;
}
@if $mark-fore-color != $fore-color {
color: $mark-fore-color;
}
@if $mark-font-size != 100% {
font-size: $mark-font-size;
}
@if $mark-line-height != $base-line-height {
line-height: $mark-line-height;
}
@if $mark-border-style != 0 {
border: $mark-border-style;
}
@if $mark-border-radius != 0 {
border-radius: $mark-border-radius;
}
@if $mark-padding != 0 {
padding: $mark-padding;
}
@if $mark-margin != 0 {
margin: $mark-margin;
}
@if $mark-box-shadow != none {
box-shadow: $mark-box-shadow;
}
&.#{$mark-inline-block-name}{
display: inline-block; // Can be used to deal with some problems.
}
}
// Mixin for alternate mark (contextual color variants).
// Variables:
// - $mark-alt-name : The name of the class used for the alternate mark.
// - $mark-alt-back-color : The background color of the alternate mark.
// - $mark-alt-fore-color : (Optional) The text color of the alternate mark. Defaults to the text color of the mark.
@mixin make-mark-alt-color ($mark-alt-name, $mark-alt-back-color, $mark-alt-fore-color: $mark-fore-color) {
mark.#{$mark-alt-name} {
@if $mark-alt-back-color != $mark-back-color {
background: $mark-alt-back-color;
}
@if $mark-alt-fore-color != $mark-fore-color {
color: $mark-alt-fore-color;
}
}
}
// Mixin for alternative mark styles (contextual tags).
// Variables:
// - $mark-alt-name : The name of the class used for the alternate mark style.
// - $mark-alt-border-style : The border-style of the alternate mark style.
// - $mark-alt-border-radius : The border-radius of the alternate mark style.
// - $mark-alt-padding : (Optional) The padding of the alternate mark style. Defaults to the padding of the mark.
// - $mark-alt-font-size : (Optional) The font-size of the alternate mark style. Defaults to the font-size of the mark.
// - $mark-alt-line-height : (Optional) The line height of the alternate mark style. Defaults to the line height of the mark.
// - $mark-alt-box-shadow : (Optional) The box shadow of the alternate mark style. Defaults to the box shadow of the mark.
@mixin make-mark-alt-style ($mark-alt-name, $mark-alt-border-style, $mark-alt-border-radius,
$mark-alt-padding : $mark-padding, $mark-alt-font-size : $mark-font-size, $mark-alt-line-height : $mark-line-height,
$mark-alt-box-shadow : $mark-box-shadow ) {
mark.#{$mark-alt-name} {
@if $mark-alt-font-size != $mark-font-size {
font-size: $mark-alt-font-size;
}
@if $mark-alt-line-height != $mark-line-height {
line-height: $mark-alt-line-height;
}
@if $mark-alt-border-style != $mark-border-style {
border: $mark-alt-border-style;
}
@if $mark-alt-border-radius != $mark-border-radius {
border-radius: $mark-alt-border-radius;
}
@if $mark-alt-padding != $mark-padding {
padding: $mark-alt-padding;
}
@if $mark-alt-box-shadow != $mark-box-shadow {
box-shadow: $mark-alt-box-shadow;
}
}
}
// Alert variables
$alert-name: 'alert' !default; // Class name for the alerts
$alert-include-animated: true !default; // Should animated alerts be included?
$alert-animated-name: 'animated' !default; // Class name for animated alerts
// Animation definition for animated alerts (included if wanted)
@if $alert-include-animated {
@-webkit-keyframes alert-anim {
0% { -webkit-transform: scale(1); }
45% { -webkit-transform: scale(1); }
50% { -webkit-transform: scale(1.005);}
55% { -webkit-transform: scale(1); }
100% { -webkit-transform: scale(1); }
}
@keyframes alert-anim {
0% { transform: scale(1); }
45% { transform: scale(1); }
50% { transform: scale(1.005);}
55% { transform: scale(1); }
100% { transform: scale(1); }
}
}
// Default styling for alerts. Use mixins for alternate styles
.#{$alert-name} {
display: block;
@if $alert-back-color != $back-color {
background: $alert-back-color;
}
@if $alert-fore-color != $fore-color {
color: $alert-fore-color;
}
@if $alert-border-style != 0 {
border: $alert-border-style;
}
@if $alert-border-radius != 0 {
border-radius: $alert-border-radius;
}
@if $alert-margin != 0 {
margin: $alert-margin;
}
@if $alert-padding != 0 {
padding: $alert-padding;
}
@if $alert-box-shadow != none {
box-shadow: $alert-box-shadow;
}
@if $alert-include-animated {
&.#{$alert-animated-name} {
// Try to make the animated alert not blurry
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translateZ(0);
transform: translateZ(0);
// Apply the animation
-webkit-animation: alert-anim 6s linear infinite;
animation: alert-anim 6s linear infinite;
}
}
}
// Mixin for alternate alert (alert color variants).
// Variables:
// - $alert-alt-name : The name of the class used for the alternate alert.
// - $alert-alt-back-color : The background color of the alternate alert.
// - $alert-alt-fore-color : (Optional) The text color of the alternate mark. Defaults to the text color of the alert.
@mixin make-alert-alt-color ($alert-alt-name, $alert-alt-back-color, $alert-alt-fore-color: $alert-fore-color) {
.#{$alert-name}.#{$alert-alt-name} {
@if $alert-alt-back-color != $alert-back-color {
background: $alert-alt-back-color;
}
@if $alert-alt-fore-color != $alert-fore-color {
color: $alert-alt-fore-color;
}
}
}
// Mixin for alternate alert styles (alert style variants).
// Variables:
// - $alert-alt-name : The name of the class used for the alternate alert style.
// - $alert-alt-border-style : The border style of the alternate alert style.
// - $alert-alt-border-radius : Border radius of the alternate alert style.
// - $alert-alt-padding : (Optional) Padding of the alternate alert style. Defaults to the alert's padding.
// - $alert-alt-margin : (Optional) Margin of the alternate alert style. Defaults to the alert's margin.
// - $alert-alt-box-shadow : (Optional) Box shadow of the alretnate alert style. Defaults to the alert's box shadow.
@mixin make-alert-alt-style ($alert-alt-name, $alert-alt-border-style, $alert-alt-border-radius,
$alert-alt-padding : $alert-padding, $alert-alt-margin : $alert-margin,
$alert-alt-box-shadow : $alert-box-shadow) {
.#{$alert-name}.#{$alert-alt-name} {
@if $alert-alt-border-style != $alert-border-style {
border: $alert-alt-border-style;
}
@if $alert-alt-border-radius != $alert-border-radius {
border-radius: $alert-alt-border-radius;
}
@if $alert-alt-padding != $alert-padding {
padding: $alert-alt-padding;
}
@if $alert-alt-margin != $alert-margin {
margin: $alert-alt-margin;
}
@if $alert-alt-box-shadow != $alert-box-shadow {
box-shadow: $alert-alt-box-shadowbox-shadow;
}
}
}
// Tooltip variables
$include-tooltip: true !default; // Should tooltips be included?
$tooltip-name: 'tooltip' !default; // Class name for the tooltips
$tooltip-bottom-name: 'bottom' !default; // Bottom tooltip class name
// Default styling for alerts. Use mixins for alternate styles
@if $include-tooltip {
.#{$tooltip-name} {
position: relative;
display: inline-block;
&:before, &:after {
position: absolute;
opacity: 0;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(100%);
clip-path: inset(100%);
-webkit-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
// Remember to keep this index a lower value than the one used for stickies.
z-index: 1010; // Deals with certain problems when combined with cards and tables.
}
&:before, &:after {
left: 50%;
}
&:not(.#{$tooltip-bottom-name}):before, &:not(.#{$tooltip-bottom-name}):after { // Top (default) tooltip styling
bottom: 100%;
}
&.#{$tooltip-bottom-name}:before, &.#{$tooltip-bottom-name}:after { // Bottom tooltip styling
top: 100%;
}
&:hover, &:active, &:focus {
&:before, &:after {
opacity: 1;
clip: auto;
-webkit-clip-path: inset(0%);
clip-path: inset(0%);
}
}
&:before { // This is the little tooltip triangle
content: '';
background: transparent;
border: $tooltip-tail-size solid transparent;
}
&:not(.#{$tooltip-bottom-name}):before { // Top (default) tooltip styling
border-top-color: $tooltip-back-color;
}
&.#{$tooltip-bottom-name}:before { // Bottom tooltip styling
border-bottom-color: $tooltip-back-color;
}
&:after { // This is the actual tooltip's text block
content: attr(aria-label);
background: $tooltip-back-color;
@if $tooltip-border-radius != 0 {
border-radius: $tooltip-border-radius;
}
@if $tooltip-fore-color != $fore-color {
color: $tooltip-fore-color;
}
@if $tooltip-padding != 0 {
padding: $tooltip-padding;
}
@if $tooltip-box-shadow != none {
box-shadow: $tooltip-box-shadow;
}
white-space: nowrap;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}
&:not(.#{$tooltip-bottom-name}):after { // Top (default) tooltip styling
margin-bottom: 2 * $tooltip-tail-size;
}
&.#{$tooltip-bottom-name}:after { // Bottom tooltip styling
margin-top: 2 * $tooltip-tail-size;
}
}
@supports (left: calc(50% - #{$tooltip-tail-size})) or (left: -webkit-calc(50% - #{$tooltip-tail-size})){
.#{$tooltip-name}:before {
left: -webkit-calc(50% - #{$tooltip-tail-size});
left: calc(50% - #{$tooltip-tail-size});
}
}
}
// Mixin for alternate tooltip (tooltip color variants).
// Variables:
// - $tooltip-alt-name : The name of the class used for the alternate tooltip.
// - $tooltip-alt-back-color : The background color of the alternate tooltip.
// - $tooltip-alt-fore-color : (Optional) The text color of the alternate mark. Defaults to the text color of the tooltip.
@mixin make-tooltip-alt-color ($tooltip-alt-name, $tooltip-alt-back-color, $tooltip-alt-fore-color: $tooltip-fore-color) {
.#{$tooltip-name}.#{$tooltip-alt-name} {
@if $tooltip-alt-back-color != $tooltip-back-color {
&:not(.#{$tooltip-bottom-name}):before { // Top (default) tooltip styling
border-top-color: $tooltip-alt-back-color;
}
&.#{$tooltip-bottom-name}:before { // Bottom tooltip styling
border-bottom-color: $tooltip-alt-back-color;
}
}
&:after {
@if $tooltip-alt-back-color != $tooltip-back-color {
background: $tooltip-alt-back-color;
}
@if $tooltip-alt-fore-color != $tooltip-fore-color {
color: $tooltip-alt-fore-color;
}
}
}
}
// Mixin for alternate tooltip styles (tooltip style variants).
// Variables:
// - $tooltip-alt-name : The name of the class used for the alternate tooltip style.
// - $tooltip-alt-tail-size : The border style of the alternate tooltip style.
// - $tooltip-alt-border-radius : Border radius of the alternate tooltip style.
// - $tooltip-alt-padding : (Optional) Padding of the alternate tooltip style. Defaults to the tooltip's padding.
// - $tooltip-alt-box-shadow : (Optional) Box shadow of the alretnate tooltip style. Defaults to the tooltip's box shadow.
@mixin make-tooltip-alt-style ($tooltip-alt-name, $tooltip-alt-tail-size, $tooltip-alt-border-radius,
$tooltip-alt-padding : $tooltip-padding, $tooltip-alt-box-shadow : $tooltip-box-shadow) {
.#{$tooltip-name}.#{$tooltip-alt-name} {
@if $tooltip-alt-tail-size != $tooltip-tail-size {
&:before {
border-width: $tooltip-alt-tail-size;
}
&:not(.#{$tooltip-bottom-name}):after { // Top (default) tooltip styling
margin-bottom: 2 * $tooltip-alt-tail-size;
}
&.#{$tooltip-bottom-name}:after { // Bottom tooltip styling
margin-top: 2 * $tooltip-alt-tail-size;
}
}
&:after {
@if $tooltip-alt-border-radius != $tooltip-border-radius {
border-radius: $tooltip-alt-border-radius;
}
@if $tooltip-alt-padding != $tooltip-padding {
padding: $tooltip-alt-padding;
}
@if $tooltip-alt-box-shadow != $tooltip-box-shadow {
box-shadow: $tooltip-alt-box-shadow;
}
}
}
@if $tooltip-alt-tail-size != $tooltip-tail-size {
@supports (left: calc(50% - #{$tooltip-tail-size})) or (left: -webkit-calc(50% - #{$tooltip-tail-size})){
.#{$tooltip-name}.#{$tooltip-alt-name}:before {
left: -webkit-calc(50% - #{$tooltip-alt-tail-size});
left: calc(50% - #{$tooltip-alt-tail-size});
}
}
}
}
/*
Definitions for contextual background elements and alerts.
*/
// Contextual background elements use the mark element as their base.
// Default styling for mark. Use mixins for alternate styles.
$mark-inline-block-name: 'inline-block' !default; // Class name for <mark> inline block styling
mark {
@if $mark-back-color != $back-color {
background: $mark-back-color;
}
@if $mark-fore-color != $fore-color {
color: $mark-fore-color;
}
@if $mark-font-size != 100% {
font-size: $mark-font-size;
}
@if $mark-line-height != $base-line-height {
line-height: $mark-line-height;
}
@if $mark-border-style != 0 {
border: $mark-border-style;
}
@if $mark-border-radius != 0 {
border-radius: $mark-border-radius;
}
@if $mark-padding != 0 {
padding: $mark-padding;
}
@if $mark-margin != 0 {
margin: $mark-margin;
}
@if $mark-box-shadow != none {
box-shadow: $mark-box-shadow;
}
&.#{$mark-inline-block-name}{
display: inline-block; // Can be used to deal with some problems.
}
}
// Mixin for alternate mark (contextual color variants).
// Variables:
// - $mark-alt-name : The name of the class used for the alternate mark.
// - $mark-alt-back-color : The background color of the alternate mark.
// - $mark-alt-fore-color : (Optional) The text color of the alternate mark. Defaults to the text color of the mark.
@mixin make-mark-alt-color ($mark-alt-name, $mark-alt-back-color, $mark-alt-fore-color: $mark-fore-color) {
mark.#{$mark-alt-name} {
@if $mark-alt-back-color != $mark-back-color {
background: $mark-alt-back-color;
}
@if $mark-alt-fore-color != $mark-fore-color {
color: $mark-alt-fore-color;
}
}
}
// Mixin for alternative mark styles (contextual tags).
// Variables:
// - $mark-alt-name : The name of the class used for the alternate mark style.
// - $mark-alt-border-style : The border-style of the alternate mark style.
// - $mark-alt-border-radius : The border-radius of the alternate mark style.
// - $mark-alt-padding : (Optional) The padding of the alternate mark style. Defaults to the padding of the mark.
// - $mark-alt-font-size : (Optional) The font-size of the alternate mark style. Defaults to the font-size of the mark.
// - $mark-alt-line-height : (Optional) The line height of the alternate mark style. Defaults to the line height of the mark.
// - $mark-alt-box-shadow : (Optional) The box shadow of the alternate mark style. Defaults to the box shadow of the mark.
@mixin make-mark-alt-style ($mark-alt-name, $mark-alt-border-style, $mark-alt-border-radius,
$mark-alt-padding : $mark-padding, $mark-alt-font-size : $mark-font-size, $mark-alt-line-height : $mark-line-height,
$mark-alt-box-shadow : $mark-box-shadow ) {
mark.#{$mark-alt-name} {
@if $mark-alt-font-size != $mark-font-size {
font-size: $mark-alt-font-size;
}
@if $mark-alt-line-height != $mark-line-height {
line-height: $mark-alt-line-height;
}
@if $mark-alt-border-style != $mark-border-style {
border: $mark-alt-border-style;
}
@if $mark-alt-border-radius != $mark-border-radius {
border-radius: $mark-alt-border-radius;
}
@if $mark-alt-padding != $mark-padding {
padding: $mark-alt-padding;
}
@if $mark-alt-box-shadow != $mark-box-shadow {
box-shadow: $mark-alt-box-shadow;
}
}
}
// Alert variables
$alert-name: 'alert' !default; // Class name for the alerts
$alert-include-animated: true !default; // Should animated alerts be included?
$alert-animated-name: 'animated' !default; // Class name for animated alerts
// Animation definition for animated alerts (included if wanted)
@if $alert-include-animated {
@-webkit-keyframes alert-anim {
0% { -webkit-transform: scale(1); }
45% { -webkit-transform: scale(1); }
50% { -webkit-transform: scale(1.005);}
55% { -webkit-transform: scale(1); }
100% { -webkit-transform: scale(1); }
}
@keyframes alert-anim {
0% { transform: scale(1); }
45% { transform: scale(1); }
50% { transform: scale(1.005);}
55% { transform: scale(1); }
100% { transform: scale(1); }
}
}
// Default styling for alerts. Use mixins for alternate styles
.#{$alert-name} {
display: block;
@if $alert-back-color != $back-color {
background: $alert-back-color;
}
@if $alert-fore-color != $fore-color {
color: $alert-fore-color;
}
@if $alert-border-style != 0 {
border: $alert-border-style;
}
@if $alert-border-radius != 0 {
border-radius: $alert-border-radius;
}
@if $alert-margin != 0 {
margin: $alert-margin;
}
@if $alert-padding != 0 {
padding: $alert-padding;
}
@if $alert-box-shadow != none {
box-shadow: $alert-box-shadow;
}
@if $alert-include-animated {
&.#{$alert-animated-name} {
// Try to make the animated alert not blurry
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translateZ(0);
transform: translateZ(0);
// Apply the animation
-webkit-animation: alert-anim 6s linear infinite;
animation: alert-anim 6s linear infinite;
}
}
}
// Mixin for alternate alert (alert color variants).
// Variables:
// - $alert-alt-name : The name of the class used for the alternate alert.
// - $alert-alt-back-color : The background color of the alternate alert.
// - $alert-alt-fore-color : (Optional) The text color of the alternate mark. Defaults to the text color of the alert.
@mixin make-alert-alt-color ($alert-alt-name, $alert-alt-back-color, $alert-alt-fore-color: $alert-fore-color) {
.#{$alert-name}.#{$alert-alt-name} {
@if $alert-alt-back-color != $alert-back-color {
background: $alert-alt-back-color;
}
@if $alert-alt-fore-color != $alert-fore-color {
color: $alert-alt-fore-color;
}
}
}
// Mixin for alternate alert styles (alert style variants).
// Variables:
// - $alert-alt-name : The name of the class used for the alternate alert style.
// - $alert-alt-border-style : The border style of the alternate alert style.
// - $alert-alt-border-radius : Border radius of the alternate alert style.
// - $alert-alt-padding : (Optional) Padding of the alternate alert style. Defaults to the alert's padding.
// - $alert-alt-margin : (Optional) Margin of the alternate alert style. Defaults to the alert's margin.
// - $alert-alt-box-shadow : (Optional) Box shadow of the alretnate alert style. Defaults to the alert's box shadow.
@mixin make-alert-alt-style ($alert-alt-name, $alert-alt-border-style, $alert-alt-border-radius,
$alert-alt-padding : $alert-padding, $alert-alt-margin : $alert-margin,
$alert-alt-box-shadow : $alert-box-shadow) {
.#{$alert-name}.#{$alert-alt-name} {
@if $alert-alt-border-style != $alert-border-style {
border: $alert-alt-border-style;
}
@if $alert-alt-border-radius != $alert-border-radius {
border-radius: $alert-alt-border-radius;
}
@if $alert-alt-padding != $alert-padding {
padding: $alert-alt-padding;
}
@if $alert-alt-margin != $alert-margin {
margin: $alert-alt-margin;
}
@if $alert-alt-box-shadow != $alert-box-shadow {
box-shadow: $alert-alt-box-shadowbox-shadow;
}
}
}
// Tooltip variables
$include-tooltip: true !default; // Should tooltips be included?
$tooltip-name: 'tooltip' !default; // Class name for the tooltips
$tooltip-bottom-name: 'bottom' !default; // Bottom tooltip class name
// Default styling for alerts. Use mixins for alternate styles
@if $include-tooltip {
.#{$tooltip-name} {
position: relative;
display: inline-block;
&:before, &:after {
position: absolute;
opacity: 0;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(100%);
clip-path: inset(100%);
-webkit-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
// Remember to keep this index a lower value than the one used for stickies.
z-index: 1010; // Deals with certain problems when combined with cards and tables.
}
&:before, &:after {
left: 50%;
}
&:not(.#{$tooltip-bottom-name}):before, &:not(.#{$tooltip-bottom-name}):after { // Top (default) tooltip styling
bottom: 100%;
}
&.#{$tooltip-bottom-name}:before, &.#{$tooltip-bottom-name}:after { // Bottom tooltip styling
top: 100%;
}
&:hover, &:active, &:focus {
&:before, &:after {
opacity: 1;
clip: auto;
-webkit-clip-path: inset(0%);
clip-path: inset(0%);
}
}
&:before { // This is the little tooltip triangle
content: '';
background: transparent;
border: $tooltip-tail-size solid transparent;
}
&:not(.#{$tooltip-bottom-name}):before { // Top (default) tooltip styling
border-top-color: $tooltip-back-color;
}
&.#{$tooltip-bottom-name}:before { // Bottom tooltip styling
border-bottom-color: $tooltip-back-color;
}
&:after { // This is the actual tooltip's text block
content: attr(aria-label);
background: $tooltip-back-color;
@if $tooltip-border-radius != 0 {
border-radius: $tooltip-border-radius;
}
@if $tooltip-fore-color != $fore-color {
color: $tooltip-fore-color;
}
@if $tooltip-padding != 0 {
padding: $tooltip-padding;
}
@if $tooltip-box-shadow != none {
box-shadow: $tooltip-box-shadow;
}
white-space: nowrap;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}
&:not(.#{$tooltip-bottom-name}):after { // Top (default) tooltip styling
margin-bottom: 2 * $tooltip-tail-size;
}
&.#{$tooltip-bottom-name}:after { // Bottom tooltip styling
margin-top: 2 * $tooltip-tail-size;
}
}
@supports (left: calc(50% - #{$tooltip-tail-size})) or (left: -webkit-calc(50% - #{$tooltip-tail-size})){
.#{$tooltip-name}:before {
left: -webkit-calc(50% - #{$tooltip-tail-size});
left: calc(50% - #{$tooltip-tail-size});
}
}
}
// Mixin for alternate tooltip (tooltip color variants).
// Variables:
// - $tooltip-alt-name : The name of the class used for the alternate tooltip.
// - $tooltip-alt-back-color : The background color of the alternate tooltip.
// - $tooltip-alt-fore-color : (Optional) The text color of the alternate mark. Defaults to the text color of the tooltip.
@mixin make-tooltip-alt-color ($tooltip-alt-name, $tooltip-alt-back-color, $tooltip-alt-fore-color: $tooltip-fore-color) {
.#{$tooltip-name}.#{$tooltip-alt-name} {
@if $tooltip-alt-back-color != $tooltip-back-color {
&:not(.#{$tooltip-bottom-name}):before { // Top (default) tooltip styling
border-top-color: $tooltip-alt-back-color;
}
&.#{$tooltip-bottom-name}:before { // Bottom tooltip styling
border-bottom-color: $tooltip-alt-back-color;
}
}
&:after {
@if $tooltip-alt-back-color != $tooltip-back-color {
background: $tooltip-alt-back-color;
}
@if $tooltip-alt-fore-color != $tooltip-fore-color {
color: $tooltip-alt-fore-color;
}
}
}
}
// Mixin for alternate tooltip styles (tooltip style variants).
// Variables:
// - $tooltip-alt-name : The name of the class used for the alternate tooltip style.
// - $tooltip-alt-tail-size : The border style of the alternate tooltip style.
// - $tooltip-alt-border-radius : Border radius of the alternate tooltip style.
// - $tooltip-alt-padding : (Optional) Padding of the alternate tooltip style. Defaults to the tooltip's padding.
// - $tooltip-alt-box-shadow : (Optional) Box shadow of the alretnate tooltip style. Defaults to the tooltip's box shadow.
@mixin make-tooltip-alt-style ($tooltip-alt-name, $tooltip-alt-tail-size, $tooltip-alt-border-radius,
$tooltip-alt-padding : $tooltip-padding, $tooltip-alt-box-shadow : $tooltip-box-shadow) {
.#{$tooltip-name}.#{$tooltip-alt-name} {
@if $tooltip-alt-tail-size != $tooltip-tail-size {
&:before {
border-width: $tooltip-alt-tail-size;
}
&:not(.#{$tooltip-bottom-name}):after { // Top (default) tooltip styling
margin-bottom: 2 * $tooltip-alt-tail-size;
}
&.#{$tooltip-bottom-name}:after { // Bottom tooltip styling
margin-top: 2 * $tooltip-alt-tail-size;
}
}
&:after {
@if $tooltip-alt-border-radius != $tooltip-border-radius {
border-radius: $tooltip-alt-border-radius;
}
@if $tooltip-alt-padding != $tooltip-padding {
padding: $tooltip-alt-padding;
}
@if $tooltip-alt-box-shadow != $tooltip-box-shadow {
box-shadow: $tooltip-alt-box-shadow;
}
}
}
@if $tooltip-alt-tail-size != $tooltip-tail-size {
@supports (left: calc(50% - #{$tooltip-tail-size})) or (left: -webkit-calc(50% - #{$tooltip-tail-size})){
.#{$tooltip-name}.#{$tooltip-alt-name}:before {
left: -webkit-calc(50% - #{$tooltip-alt-tail-size});
left: calc(50% - #{$tooltip-alt-tail-size});
}
}
}
}

View file

@ -1,409 +1,409 @@
/*
Browsers resets and base typography.
*/
$apply-defaults-to-all: true !default; // Should default values be applied to all elements? (`true` or `false`).
$base-root-font-size: 16px !default; // Root font sizing for all elements - In `px` only!
html {
font-size: $base-root-font-size; // Set root's font sizing.
}
@if $apply-defaults-to-all {
html, * {
font-family: #{$base-font-family};
line-height: $base-line-height;
// Prevent adjustments of font size after orientation changes in mobile.
-webkit-text-size-adjust: 100%;
}
* {
font-size: $base-font-size;
}
}
@else {
html {
font-family: #{$base-font-family};
line-height: $base-line-height;
// Prevent adjustments of font size after orientation changes in mobile.
-webkit-text-size-adjust: 100%;
}
}
body {
margin: $body-margin;
color: $fore-color;
background: $back-color;
}
// Correct display for older versions of IE. Fix display of some elements in other browsers as well.
article, aside, section, figcaption, figure, main, details, menu {
display: block;
}
// Correct display in all browsers.
summary {
display: list-item;
}
abbr[title] {
border-bottom: none; // Remove bottom border in Firefox 39-.
text-decoration: underline; // Opinionated style-fix for all browsers.
}
// Correct display for older versions of IE.
audio, video {
display: inline-block;
}
// Hide overflow in IE.
svg:not(:root) {
overflow: hidden;
}
// Show overflow in IE.
input {
overflow: visible;
}
// Make images responsive by default.
img {
max-width: 100%;
height: auto;
}
// Fix display in older versions of Android.
$include-dfn-fix: true !default;
@if $include-dfn-fix {
dfn {
font-style: italic;
}
}
h1, h2, h3, h4, h5, h6 {
line-height: $heading-line-height;
margin: $heading-margin;
font-weight: $heading-font-weight;
small {
color: $heading-smalltext-fore-color;
$make-heading-smalltext-block: false !default;
@if $make-heading-smalltext-block {
display: block;
@if $heading-smalltext-b-top-margin != 0 {
margin-top: $heading-smalltext-b-top-margin;
}
@if $heading-smalltext-b-font-size != $small-font-size {
font-size: $heading-smalltext-b-font-size;
}
}
}
}
h1 {
font-size: $h1-font-size;
}
h2 {
font-size: $h2-font-size;
}
h3 {
font-size: $h3-font-size;
}
h4 {
font-size: $h4-font-size;
}
h5 {
font-size: $h5-font-size;
}
h6 {
font-size: $h6-font-size;
}
p {
margin: $paragraph-margin;
}
ol, ul {
margin: $list-margin;
padding-left: $list-left-padding;
}
b, strong {
font-weight: $bold-font-weight;
}
hr {
// Fixes and defaults for styling
box-sizing: content-box;
border: 0;
overflow: visible;
// Actual styling using variables
line-height: $horizontal-rule-line-height;
margin: $horizontal-rule-margin;
$horizontal-rule-fancy-style: false !default;
@if $horizontal-rule-fancy-style {
height: 1px;
background: -webkit-linear-gradient(#{$horizontal-rule-fancy-gradient});
background: linear-gradient(#{$horizontal-rule-fancy-gradient});
}
@else {
height: 0;
border-top: $horizontal-rule-border-style;
}
}
blockquote {
display: block;
position: relative;
font-style: italic;
@if $blockquote-back-color != $back-color {
background: $blockquote-back-color;
}
@if $blockquote-fore-color != $fore-color {
color: $blockquote-fore-color;
}
// Overwrite defaults
margin: $blockquote-margin;
padding: $blockquote-padding;
@if $blockquote-sidebar-style != 0 {
border-left: $blockquote-sidebar-style;
}
@if $blockquote-border-style != 0 {
border: $blockquote-border-style;
}
@if $blockquote-border-radius != 0 {
border-radius: $blockquote-border-radius;
}
@if $blockquote-box-shadow != none {
box-shadow: $blockquote-box-shadow;
}
&:after {
position: absolute;
font-style: normal;
font-size: $blockquote-cite-font-size;
@if $blockquote-cite-fore-color != $blockquote-fore-color {
color: $blockquote-cite-fore-color;
}
left: $blockquote-cite-left-position;
bottom: $blockquote-cite-bottom-position;
content: '\2014 \2009'attr(cite);
}
}
$use-default-code-fonts: true !default;
@if $use-default-code-fonts {
code, kbd, pre, samp{
font-family: monospace, monospace; // Applies display fix for all code elements
}
}
@else {
code, kbd, pre, samp{
font-family: $code-font-family; // Display fix should be applied manually!
}
}
code {
@if $code-element-border-style != 0{
border: $code-element-border-style;
}
@if $code-element-border-radius != 0 {
border-radius: $code-element-border-radius;
}
@if $code-element-back-color != $back-color {
background: $code-element-back-color;
}
@if $code-element-fore-color != $fore-color {
color: $code-element-fore-color;
}
@if $code-element-padding != 0 {
padding: $code-element-padding;
}
@if $code-element-box-shadow != none {
box-shadow: $code-element-box-shadow;
}
}
pre {
overflow: auto; // Responsiveness
@if $pre-element-border-style != 0 {
border: $pre-element-border-style;
}
@if $pre-element-border-radius != 0 {
border-radius: $pre-element-border-radius;
}
@if $pre-element-back-color != $back-color {
background: $pre-element-back-color;
}
@if $pre-element-fore-color != $fore-color {
color: $pre-element-fore-color;
}
@if $pre-element-padding != 0 {
padding: $pre-element-padding;
}
@if pre-element-margin != 0 {
margin: $pre-element-margin;
}
$add-pre-element-sidebar: false !default;
@if $add-pre-element-sidebar {
border-left: $pre-element-sidebar-style;
}
@if $pre-element-box-shadow != none {
box-shadow: $pre-element-box-shadow;
}
}
kbd {
@if $kbd-element-border-style != 0 {
border: $kbd-element-border-style;
}
@if $kbd-element-border-radius != 0 {
border-radius: $kbd-element-border-radius;
}
@if $kbd-element-back-color != $back-color {
background: $kbd-element-back-color;
}
@if $kbd-element-fore-color != $fore-color {
color: $kbd-element-fore-color;
}
@if $kbd-element-padding != 0 {
padding: $kbd-element-padding;
}
@if $kbd-element-box-shadow != none {
box-shadow: $kbd-element-box-shadow;
}
}
$style-samp-element: false !default;
@if $style-samp-element {
samp{
@if $samp-element-border-style != 0 {
border: $samp-element-border-style;
}
@if $samp-element-border-radius != 0 {
border-radius: $samp-element-border-radius;
}
@if $samp-element-back-color != $back-color {
background: $samp-element-back-color;
}
@if $samp-element-fore-color != $fore-color {
color: $samp-element-fore-color;
}
@if $samp-element-padding != 0 {
padding: $samp-element-padding;
}
}
}
@if $small-font-size == $sub-font-size and $small-font-size == $sup-font-size {
small, sup, sub {
font-size: $small-font-size;
}
sup {
top: $sup-top;
}
sub{
bottom: $sub-bottom;
}
sup, sub {
line-height: 0;
position: relative;
vertical-align: baseline;
}
}
@else if $small-font-size == $sub-font-size {
small, sub {
font-size: $small-font-size;
}
sup {
font-size: $sup-font-size;
top: $sup-top;
}
sub {
bottom: $sub-bottom;
}
sup, sub {
line-height: 0;
position: relative;
vertical-align: baseline;
}
}
@else if $small-font-size == $sup-font-size {
small, sup {
font-size: $small-font-size;
}
sup {
top: $sup-top;
}
sub {
font-size: $sub-font-size;
bottom: $sub-bottom;
}
sup, sub {
line-height: 0;
position: relative;
vertical-align: baseline;
}
}
@else if $sup-font-size == $sub-font-size {
small {
font-size: $small-font-size;
}
sup, sub {
font-size: $sup-font-size;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: $sup-top;
}
sub{
bottom: $sub-bottom;
}
}
@else {
small {
font-size: $small-font-size;
}
sup {
font-size: $sup-font-size;
top: $sup-top;
}
sub{
font-size: $sub-font-size;
bottom: $sub-bottom;
}
sup, sub {
line-height: 0;
position: relative;
vertical-align: baseline;
}
}
$apply-link-underline: true !default;
$apply-link-hover-fade: true !default;
a{
color: $link-fore-color;
@if $apply-link-underline {
text-decoration: underline;
}
@else {
text-decoration: none;
}
@if $link-font-weight != 500 {
font-weight: $link-font-weight;
}
@if $apply-link-hover-fade {
opacity: 1;
-webkit-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
}
&:visited {
color: $link-visited-fore-color;
}
@if $apply-link-hover-fade {
&:hover, &:focus, &:active {
opacity: 0.75;
}
}
@else {
&:hover, &:focus, &:active {
color: $link-hover-fore-color;
}
}
}
/*
Browsers resets and base typography.
*/
$apply-defaults-to-all: true !default; // Should default values be applied to all elements? (`true` or `false`).
$base-root-font-size: 16px !default; // Root font sizing for all elements - In `px` only!
html {
font-size: $base-root-font-size; // Set root's font sizing.
}
@if $apply-defaults-to-all {
html, * {
font-family: #{$base-font-family};
line-height: $base-line-height;
// Prevent adjustments of font size after orientation changes in mobile.
-webkit-text-size-adjust: 100%;
}
* {
font-size: $base-font-size;
}
}
@else {
html {
font-family: #{$base-font-family};
line-height: $base-line-height;
// Prevent adjustments of font size after orientation changes in mobile.
-webkit-text-size-adjust: 100%;
}
}
body {
margin: $body-margin;
color: $fore-color;
background: $back-color;
}
// Correct display for older versions of IE. Fix display of some elements in other browsers as well.
article, aside, section, figcaption, figure, main, details, menu {
display: block;
}
// Correct display in all browsers.
summary {
display: list-item;
}
abbr[title] {
border-bottom: none; // Remove bottom border in Firefox 39-.
text-decoration: underline; // Opinionated style-fix for all browsers.
}
// Correct display for older versions of IE.
audio, video {
display: inline-block;
}
// Hide overflow in IE.
svg:not(:root) {
overflow: hidden;
}
// Show overflow in IE.
input {
overflow: visible;
}
// Make images responsive by default.
img {
max-width: 100%;
height: auto;
}
// Fix display in older versions of Android.
$include-dfn-fix: true !default;
@if $include-dfn-fix {
dfn {
font-style: italic;
}
}
h1, h2, h3, h4, h5, h6 {
line-height: $heading-line-height;
margin: $heading-margin;
font-weight: $heading-font-weight;
small {
color: $heading-smalltext-fore-color;
$make-heading-smalltext-block: false !default;
@if $make-heading-smalltext-block {
display: block;
@if $heading-smalltext-b-top-margin != 0 {
margin-top: $heading-smalltext-b-top-margin;
}
@if $heading-smalltext-b-font-size != $small-font-size {
font-size: $heading-smalltext-b-font-size;
}
}
}
}
h1 {
font-size: $h1-font-size;
}
h2 {
font-size: $h2-font-size;
}
h3 {
font-size: $h3-font-size;
}
h4 {
font-size: $h4-font-size;
}
h5 {
font-size: $h5-font-size;
}
h6 {
font-size: $h6-font-size;
}
p {
margin: $paragraph-margin;
}
ol, ul {
margin: $list-margin;
padding-left: $list-left-padding;
}
b, strong {
font-weight: $bold-font-weight;
}
hr {
// Fixes and defaults for styling
box-sizing: content-box;
border: 0;
overflow: visible;
// Actual styling using variables
line-height: $horizontal-rule-line-height;
margin: $horizontal-rule-margin;
$horizontal-rule-fancy-style: false !default;
@if $horizontal-rule-fancy-style {
height: 1px;
background: -webkit-linear-gradient(#{$horizontal-rule-fancy-gradient});
background: linear-gradient(#{$horizontal-rule-fancy-gradient});
}
@else {
height: 0;
border-top: $horizontal-rule-border-style;
}
}
blockquote {
display: block;
position: relative;
font-style: italic;
@if $blockquote-back-color != $back-color {
background: $blockquote-back-color;
}
@if $blockquote-fore-color != $fore-color {
color: $blockquote-fore-color;
}
// Overwrite defaults
margin: $blockquote-margin;
padding: $blockquote-padding;
@if $blockquote-sidebar-style != 0 {
border-left: $blockquote-sidebar-style;
}
@if $blockquote-border-style != 0 {
border: $blockquote-border-style;
}
@if $blockquote-border-radius != 0 {
border-radius: $blockquote-border-radius;
}
@if $blockquote-box-shadow != none {
box-shadow: $blockquote-box-shadow;
}
&:after {
position: absolute;
font-style: normal;
font-size: $blockquote-cite-font-size;
@if $blockquote-cite-fore-color != $blockquote-fore-color {
color: $blockquote-cite-fore-color;
}
left: $blockquote-cite-left-position;
bottom: $blockquote-cite-bottom-position;
content: '\2014 \2009'attr(cite);
}
}
$use-default-code-fonts: true !default;
@if $use-default-code-fonts {
code, kbd, pre, samp{
font-family: monospace, monospace; // Applies display fix for all code elements
}
}
@else {
code, kbd, pre, samp{
font-family: $code-font-family; // Display fix should be applied manually!
}
}
code {
@if $code-element-border-style != 0{
border: $code-element-border-style;
}
@if $code-element-border-radius != 0 {
border-radius: $code-element-border-radius;
}
@if $code-element-back-color != $back-color {
background: $code-element-back-color;
}
@if $code-element-fore-color != $fore-color {
color: $code-element-fore-color;
}
@if $code-element-padding != 0 {
padding: $code-element-padding;
}
@if $code-element-box-shadow != none {
box-shadow: $code-element-box-shadow;
}
}
pre {
overflow: auto; // Responsiveness
@if $pre-element-border-style != 0 {
border: $pre-element-border-style;
}
@if $pre-element-border-radius != 0 {
border-radius: $pre-element-border-radius;
}
@if $pre-element-back-color != $back-color {
background: $pre-element-back-color;
}
@if $pre-element-fore-color != $fore-color {
color: $pre-element-fore-color;
}
@if $pre-element-padding != 0 {
padding: $pre-element-padding;
}
@if pre-element-margin != 0 {
margin: $pre-element-margin;
}
$add-pre-element-sidebar: false !default;
@if $add-pre-element-sidebar {
border-left: $pre-element-sidebar-style;
}
@if $pre-element-box-shadow != none {
box-shadow: $pre-element-box-shadow;
}
}
kbd {
@if $kbd-element-border-style != 0 {
border: $kbd-element-border-style;
}
@if $kbd-element-border-radius != 0 {
border-radius: $kbd-element-border-radius;
}
@if $kbd-element-back-color != $back-color {
background: $kbd-element-back-color;
}
@if $kbd-element-fore-color != $fore-color {
color: $kbd-element-fore-color;
}
@if $kbd-element-padding != 0 {
padding: $kbd-element-padding;
}
@if $kbd-element-box-shadow != none {
box-shadow: $kbd-element-box-shadow;
}
}
$style-samp-element: false !default;
@if $style-samp-element {
samp{
@if $samp-element-border-style != 0 {
border: $samp-element-border-style;
}
@if $samp-element-border-radius != 0 {
border-radius: $samp-element-border-radius;
}
@if $samp-element-back-color != $back-color {
background: $samp-element-back-color;
}
@if $samp-element-fore-color != $fore-color {
color: $samp-element-fore-color;
}
@if $samp-element-padding != 0 {
padding: $samp-element-padding;
}
}
}
@if $small-font-size == $sub-font-size and $small-font-size == $sup-font-size {
small, sup, sub {
font-size: $small-font-size;
}
sup {
top: $sup-top;
}
sub{
bottom: $sub-bottom;
}
sup, sub {
line-height: 0;
position: relative;
vertical-align: baseline;
}
}
@else if $small-font-size == $sub-font-size {
small, sub {
font-size: $small-font-size;
}
sup {
font-size: $sup-font-size;
top: $sup-top;
}
sub {
bottom: $sub-bottom;
}
sup, sub {
line-height: 0;
position: relative;
vertical-align: baseline;
}
}
@else if $small-font-size == $sup-font-size {
small, sup {
font-size: $small-font-size;
}
sup {
top: $sup-top;
}
sub {
font-size: $sub-font-size;
bottom: $sub-bottom;
}
sup, sub {
line-height: 0;
position: relative;
vertical-align: baseline;
}
}
@else if $sup-font-size == $sub-font-size {
small {
font-size: $small-font-size;
}
sup, sub {
font-size: $sup-font-size;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: $sup-top;
}
sub{
bottom: $sub-bottom;
}
}
@else {
small {
font-size: $small-font-size;
}
sup {
font-size: $sup-font-size;
top: $sup-top;
}
sub{
font-size: $sub-font-size;
bottom: $sub-bottom;
}
sup, sub {
line-height: 0;
position: relative;
vertical-align: baseline;
}
}
$apply-link-underline: true !default;
$apply-link-hover-fade: true !default;
a{
color: $link-fore-color;
@if $apply-link-underline {
text-decoration: underline;
}
@else {
text-decoration: none;
}
@if $link-font-weight != 500 {
font-weight: $link-font-weight;
}
@if $apply-link-hover-fade {
opacity: 1;
-webkit-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
}
&:visited {
color: $link-visited-fore-color;
}
@if $apply-link-hover-fade {
&:hover, &:focus, &:active {
opacity: 0.75;
}
}
@else {
&:hover, &:focus, &:active {
color: $link-hover-fore-color;
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,466 +1,466 @@
/*
Definitions for forms and input elements.
*/
// Different elements are styled based on the same set of rules.
// Base form styling.
form {
@if $form-back-color != $back-color {
background: $form-back-color;
}
@if $form-fore-color != $fore-color {
color: $form-fore-color;
}
@if $form-border-style != 0 {
border: $form-border-style;
}
@if $form-border-radius != 0 {
border-radius: $form-border-radius;
}
@if $form-margin != 0 {
margin: $form-margin;
}
@if $form-padding != 0 {
padding: $form-padding;
}
@if $form-box-shadow != none {
box-shadow: $form-box-shadow;
}
}
// Fieldset styling.
fieldset {
@if $fieldset-back-color != $form-back-color {
background: $fieldset-back-color;
}
// Apply always to overwrite defaults for all of the below.
border: $fieldset-border-style;
border-radius: $fieldset-border-radius;
margin: $fieldset-margin;
padding: $fieldset-padding;
}
// Legend styling.
legend {
// IE and Edge fixes.
box-sizing: border-box;
display: table;
max-width: 100%;
white-space: normal;
// Actual styling.
font-weight: $legend-font-weight;
font-size: $legend-font-size;
@if $legend-fore-color != $fore-color {
color: $legend-fore-color;
}
@if $legend-padding != 0 {
padding: $legend-padding;
}
}
// Label syling.
@if $label-padding != 0 {
label {
padding: $label-padding; // Padding is all that seems to be needed for now, but more stuff could be added later.
}
}
$include-fluid-input-group: true !default; // Should fluid input groups be included?
// Input group base naming.
.#{$input-group-name} {
display: inline-block;
// Fluid input groups
@if $include-fluid-input-group {
&.#{$input-group-fluid-name} {
// Old syntax
display: -webkit-box;
-webkit-box-pack: justify;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
& > input {
// Old syntax
-webkit-box-flex: 1;
max-width: 100%;
// New syntax
-webkit-flex-grow: 1;
flex-grow: 1;
-webkit-flex-basis: 0;
flex-basis: 0;
}
}
}
}
// Responsiveness for fluid input groups
@if $include-fluid-input-group {
@media (max-width: #{$input-group-mobile-breakpoint}) {
.#{$input-group-name}.#{$input-group-fluid-name} {
// Old syntax
-webkit-box-orient: vertical;
// New syntax
-webkit-align-items: stretch;
align-items: stretch;
-webkit-flex-direction: column;
flex-direction: column;
}
}
}
// Correct the cursor style of increment and decrement buttons in Chrome.
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {
height: auto;
}
// Remove the default vertical scrollbar in IE.
textarea {
overflow: auto;
}
// Correct style in Chrome and Safari.
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
// Correct style in Chrome and Safari.
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
// The belo option will use the legacy high specificity selectors for <input> element styling instead
// of the less specific, yet less complicated and less bloated input selector. This only applies to
// the pseudo-classes and states of the <input> controls and not the default styling of them.
$input-high-specificity-selectors: false !default; // Hidden option: `false` by default!
// Common textual input styling.
input:not([type]), [type="text"], [type="email"], [type="number"], [type="search"],
[type="password"], [type="url"], [type="tel"], textarea, select {
box-sizing: border-box;
// Background, color and border should not be unassigned, as the browser defaults will apply.
background: $input-back-color;
color: $input-fore-color;
border: $input-border-style;
@if $input-border-radius != 0 {
border-radius: $input-border-radius;
}
@if $input-margin != 0 {
margin: $input-margin;
}
@if $input-padding != 0 {
padding: $input-padding;
}
@if $input-high-specificity-selectors {
&:hover, &:focus {
border-color: $input-focus-border-color;
box-shadow: none;
}
&:disabled, &[disabled] {
cursor: not-allowed;
opacity: $input-disabled-opacity;
}
&:invalid, &:focus:invalid{
border-color: $input-invalid-border-color;
box-shadow: none;
}
&[readonly]{
background: $input-readonly-back-color;
border-color: $input-readonly-border-color;
}
}
}
@if not $input-high-specificity-selectors {
input:not([type="button"]):not([type="submit"]):not([type="reset"]), textarea, select {
&:hover, &:focus {
border-color: $input-focus-border-color;
box-shadow: none;
}
&:disabled, &[disabled] {
cursor: not-allowed;
opacity: $input-disabled-opacity;
}
&:invalid, &:focus:invalid{
border-color: $input-invalid-border-color;
box-shadow: none;
}
//&:focus:invalid:focus {
// border-color: brown;
//}
&[readonly]{
background: $input-readonly-back-color;
border-color: $input-readonly-border-color;
}
}
}
// Placeholder styling.
::-webkit-input-placeholder {
opacity: 1;
color: $input-placeholder-fore-color;
}
::-moz-placeholder {
opacity: 1;
color: $input-placeholder-fore-color;
}
::-ms-placeholder {
opacity: 1;
color: $input-placeholder-fore-color;
}
// Definitions for the button and button-like elements.
// Different elements are styled based on the same set of rules.
// Reset for Firefox focusing on button elements.
button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
// Fixes for Android 4, iOS and Safari.
button, html [type="button"], [type="reset"], [type="submit"] {
-webkit-appearance: button;
}
// Other fixes.
button {
overflow: visible; // Show the overflow in IE.
text-transform: none; // Remove inheritance of text-transform in Edge, Firefox, and IE.
}
// Default styling
button, [type="button"], [type="submit"], [type="reset"],
a.#{$button-class-name}, label.#{$button-class-name}, .#{$button-class-name},
a[role="button"], label[role="button"], [role="button"] {
display: inline-block;
background: rgba($button-back-color, $button-back-opacity);
color: $button-fore-color;
border: $button-border-style;
@if $button-border-radius != 0 {
border-radius: $button-border-radius;
}
@if $button-padding != 0 {
padding: $button-padding;
}
@if $button-margin != 0 {
margin: $button-margin;
}
@if $button-box-shadow != none {
box-shadow: $button-box-shadow;
}
@if $apply-link-underline { // Override for links if underline is enabled.
text-decoration: none;
}
-webkit-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
cursor: pointer;
&:hover, &:active, &:focus {
background: rgba($button-back-color, $button-hover-back-opacity);
@if $apply-link-hover-fade { // Override for links if hover-fade is enabled.
opacity: 1;
}
}
&:disabled, &[disabled] {
cursor: not-allowed;
opacity: $button-disabled-opacity;
}
}
// Styling for file inputs
$hide-file-inputs: true !default;
@if $hide-file-inputs {
input[type="file"] { // Hide, use labels instead. Hidden inputs like this are still accessible.
border: 0;
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(100%);
clip-path: inset(100%);
}
}
@else {
::-webkit-file-upload-button {
-webkit-appearance: button; // Correct inability to style in iOS and Safari.
font: inherit; // Change font propery to `inherit` in Safari.
}
}
// Button group definition
.#{$button-group-name} {
// Old syntax
display: -webkit-box;
// New syntax
display: -webkit-flex;
display: flex;
border: $button-group-border-style;
@if $button-border-radius != 0 {
border-radius: $button-border-radius;
}
@if $button-group-margin != 0 {
margin: $button-group-margin;
}
@if $button-group-box-shadow != none {
box-shadow: $button-group-box-shadow;
}
button, [type="button"], [type="submit"], [type="reset"],
.#{$button-class-name}, [role="button"] {
margin: 0;
// Old syntax
-webkit-box-flex: 1;
max-width: 100%;
// New syntax
-webkit-flex-grow: 1;
flex-grow: 1;
-webkit-flex-basis: 0;
flex-basis: 0;
text-align: center;
border: 0;
@if $button-border-radius != 0 {
border-radius: 0;
}
@if $button-group-border-style != 0 {
+ button, + [type="button"], + [type="submit"], + [type="reset"],
+ .#{$button-class-name}, + [role="button"] {
border-left: $button-group-border-style;
}
}
@if $button-box-shadow != none {
box-shadow: none;
}
}
}
// Responsiveness for button groups
@media (max-width: #{$button-group-mobile-breakpoint}) {
.#{$button-group-name} {
// Old syntax
-webkit-box-orient: vertical;
// New syntax
-webkit-flex-direction: column;
flex-direction: column;
@if $button-group-border-style !=0 {
button, [type="button"], [type="submit"], [type="reset"],
.#{$button-class-name}, [role="button"] {
+ button, + [type="button"], + [type="submit"], + [type="reset"],
+ .#{$button-class-name}, + [role="button"] {
border: 0;
border-top: $button-group-border-style;
}
}
}
}
}
// Mixin for alternate buttons (button color variants).
// Variables:
// - $button-alt-name : The name of the class used for the alternate button.
// - $button-alt-back-color : The background color of the alternate button.
// - $button-alt-back-opacity : Opacity of the background color of the alternate button.
// - $button-alt-hover-back-opacity : Opacity of the background color of the alternate button on hover.
// - $button-alt-fore-color : (Optional) The text color of the alternate button. Defaults to the text color of the button.
// Notes:
// Due to something like `.button.secondary` being a higher specificity than `a.button` or `a`, no extra rules are
// required for such elements. However rules for the normal button elements are applied in order to not require the
// base class for the button styles.
@mixin make-button-alt-color ($button-alt-name, $button-alt-back-color, $button-alt-back-opacity,
$button-alt-hover-back-opacity, $button-alt-fore-color: $button-fore-color) {
button.#{$button-alt-name}, [type="button"].#{$button-alt-name}, [type="submit"].#{$button-alt-name},
[type="reset"].#{$button-alt-name}, .#{$button-class-name}.#{$button-alt-name}, [role="button"].#{$button-alt-name} {
background: rgba($button-alt-back-color, $button-alt-back-opacity);
@if $button-alt-fore-color != $button-fore-color {
color: $button-alt-fore-color;
}
&:hover, &:active, &:focus {
background: rgba($button-alt-back-color, $button-alt-hover-back-opacity);
}
}
}
// Mixin for alternate button styles (button style variants).
// Variables:
// - $button-alt-name : The name of the class used for the alternate button style.
// - $button-alt-border-style : The border style of the alternate button style.
// - $button-alt-border-radius : Border radius of the alternate button style.
// - $button-alt-padding : Padding of the alternate button style.
// - $button-alt-margin : Margin of the alternate button style.
// Notes:
// Due to something like `.button.small` being a higher specificity than `a.small` or `a`, no extra rules are
// required for such elements. However rules for the normal button elements are applied in order to not require the
// base class for the button styles.
@mixin make-button-alt-style ($button-alt-name, $button-alt-border-style, $button-alt-border-radius,
$button-alt-padding, $button-alt-margin) {
button.#{$button-alt-name}, [type="button"].#{$button-alt-name}, [type="submit"].#{$button-alt-name},
[type="reset"].#{$button-alt-name}, .#{$button-class-name}.#{$button-alt-name}, [role="button"].#{$button-alt-name} {
@if $button-alt-border-style != $button-border-style {
border: $button-alt-border-style;
}
@if $button-alt-border-radius != $button-border-radius {
border-radius: $button-alt-border-radius;
}
@if $button-alt-padding != $button-padding {
padding: $button-alt-padding;
}
@if $button-alt-margin != $button-margin {
margin: $button-alt-margin;
}
}
}
// Definitions for checkboxes and radio button elements.
// Note: both elements are hidden by default and use labels to show their input state.
// Hide both input types - accessible (element is not visible, but screen readers read it normally).
[type="checkbox"], [type="radio"] {
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
position: absolute;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(100%);
clip-path: inset(100%);
}
// Use input-group to setup the style for labels.
.#{$input-group-name} {
// Label styling based on the specifics of the checkbox/radio variables.
[type="checkbox"] + label, [type="radio"] + label {
position: relative;
margin-left: floor($checkbox-size + floor($checkbox-size * 0.25));
// Styling for checkbox/radio box part.
&:before {
//box-sizing: border-box;
display: inline-block;
position: absolute;
bottom: $checkbox-bottom-spacing;
left: 0;
width: $checkbox-size;
height: $checkbox-size;
content: '';
border: $checkbox-border-thickness solid $checkbox-border-color;
@if $checkbox-border-radius != 0 {
border-radius: $checkbox-border-radius;
}
background: $checkbox-back-color;
color: $checkbox-fore-color;
margin-left: -($checkbox-size + ($checkbox-size * 0.25));
}
// Hover, focus, active styling.
&:hover, &:active, &:focus {
&:before {
border-color: $checkbox-focus-border-color;
}
}
}
[type="checkbox"]:focus + label:before, [type="radio"]:focus + label:before {
border-color: $checkbox-focus-border-color;
}
// Make radio button box and fill circular.
[type="radio"] + label {
&:before, &:after {
border-radius: 50%;
}
}
// Disabled and readonly styles.
[type="checkbox"][disabled] + label, [type="radio"][disabled] + label {
cursor: not-allowed;
&:before, &:after {
opacity: $checkbox-disabled-opacity;
}
}
// Fill for checked checkbox/radio elements.
[type="checkbox"]:checked + label, [type="radio"]:checked + label{
&:after {
margin-left: - floor($checkbox-size + floor($checkbox-size * 0.25));
position: absolute;
bottom: floor($checkbox-size * 0.25) + $checkbox-bottom-spacing;
left: floor($checkbox-size * 0.25);
width: floor($checkbox-size * 0.5) + floor($checkbox-border-thickness * 2);
height: floor($checkbox-size * 0.5) + floor($checkbox-border-thickness * 2);
background: $checkbox-fore-color;
content: '';
}
}
}
/*
Definitions for forms and input elements.
*/
// Different elements are styled based on the same set of rules.
// Base form styling.
form {
@if $form-back-color != $back-color {
background: $form-back-color;
}
@if $form-fore-color != $fore-color {
color: $form-fore-color;
}
@if $form-border-style != 0 {
border: $form-border-style;
}
@if $form-border-radius != 0 {
border-radius: $form-border-radius;
}
@if $form-margin != 0 {
margin: $form-margin;
}
@if $form-padding != 0 {
padding: $form-padding;
}
@if $form-box-shadow != none {
box-shadow: $form-box-shadow;
}
}
// Fieldset styling.
fieldset {
@if $fieldset-back-color != $form-back-color {
background: $fieldset-back-color;
}
// Apply always to overwrite defaults for all of the below.
border: $fieldset-border-style;
border-radius: $fieldset-border-radius;
margin: $fieldset-margin;
padding: $fieldset-padding;
}
// Legend styling.
legend {
// IE and Edge fixes.
box-sizing: border-box;
display: table;
max-width: 100%;
white-space: normal;
// Actual styling.
font-weight: $legend-font-weight;
font-size: $legend-font-size;
@if $legend-fore-color != $fore-color {
color: $legend-fore-color;
}
@if $legend-padding != 0 {
padding: $legend-padding;
}
}
// Label syling.
@if $label-padding != 0 {
label {
padding: $label-padding; // Padding is all that seems to be needed for now, but more stuff could be added later.
}
}
$include-fluid-input-group: true !default; // Should fluid input groups be included?
// Input group base naming.
.#{$input-group-name} {
display: inline-block;
// Fluid input groups
@if $include-fluid-input-group {
&.#{$input-group-fluid-name} {
// Old syntax
display: -webkit-box;
-webkit-box-pack: justify;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
& > input {
// Old syntax
-webkit-box-flex: 1;
max-width: 100%;
// New syntax
-webkit-flex-grow: 1;
flex-grow: 1;
-webkit-flex-basis: 0;
flex-basis: 0;
}
}
}
}
// Responsiveness for fluid input groups
@if $include-fluid-input-group {
@media (max-width: #{$input-group-mobile-breakpoint}) {
.#{$input-group-name}.#{$input-group-fluid-name} {
// Old syntax
-webkit-box-orient: vertical;
// New syntax
-webkit-align-items: stretch;
align-items: stretch;
-webkit-flex-direction: column;
flex-direction: column;
}
}
}
// Correct the cursor style of increment and decrement buttons in Chrome.
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {
height: auto;
}
// Remove the default vertical scrollbar in IE.
textarea {
overflow: auto;
}
// Correct style in Chrome and Safari.
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
// Correct style in Chrome and Safari.
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
// The belo option will use the legacy high specificity selectors for <input> element styling instead
// of the less specific, yet less complicated and less bloated input selector. This only applies to
// the pseudo-classes and states of the <input> controls and not the default styling of them.
$input-high-specificity-selectors: false !default; // Hidden option: `false` by default!
// Common textual input styling.
input:not([type]), [type="text"], [type="email"], [type="number"], [type="search"],
[type="password"], [type="url"], [type="tel"], textarea, select {
box-sizing: border-box;
// Background, color and border should not be unassigned, as the browser defaults will apply.
background: $input-back-color;
color: $input-fore-color;
border: $input-border-style;
@if $input-border-radius != 0 {
border-radius: $input-border-radius;
}
@if $input-margin != 0 {
margin: $input-margin;
}
@if $input-padding != 0 {
padding: $input-padding;
}
@if $input-high-specificity-selectors {
&:hover, &:focus {
border-color: $input-focus-border-color;
box-shadow: none;
}
&:disabled, &[disabled] {
cursor: not-allowed;
opacity: $input-disabled-opacity;
}
&:invalid, &:focus:invalid{
border-color: $input-invalid-border-color;
box-shadow: none;
}
&[readonly]{
background: $input-readonly-back-color;
border-color: $input-readonly-border-color;
}
}
}
@if not $input-high-specificity-selectors {
input:not([type="button"]):not([type="submit"]):not([type="reset"]), textarea, select {
&:hover, &:focus {
border-color: $input-focus-border-color;
box-shadow: none;
}
&:disabled, &[disabled] {
cursor: not-allowed;
opacity: $input-disabled-opacity;
}
&:invalid, &:focus:invalid{
border-color: $input-invalid-border-color;
box-shadow: none;
}
//&:focus:invalid:focus {
// border-color: brown;
//}
&[readonly]{
background: $input-readonly-back-color;
border-color: $input-readonly-border-color;
}
}
}
// Placeholder styling.
::-webkit-input-placeholder {
opacity: 1;
color: $input-placeholder-fore-color;
}
::-moz-placeholder {
opacity: 1;
color: $input-placeholder-fore-color;
}
::-ms-placeholder {
opacity: 1;
color: $input-placeholder-fore-color;
}
// Definitions for the button and button-like elements.
// Different elements are styled based on the same set of rules.
// Reset for Firefox focusing on button elements.
button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
// Fixes for Android 4, iOS and Safari.
button, html [type="button"], [type="reset"], [type="submit"] {
-webkit-appearance: button;
}
// Other fixes.
button {
overflow: visible; // Show the overflow in IE.
text-transform: none; // Remove inheritance of text-transform in Edge, Firefox, and IE.
}
// Default styling
button, [type="button"], [type="submit"], [type="reset"],
a.#{$button-class-name}, label.#{$button-class-name}, .#{$button-class-name},
a[role="button"], label[role="button"], [role="button"] {
display: inline-block;
background: rgba($button-back-color, $button-back-opacity);
color: $button-fore-color;
border: $button-border-style;
@if $button-border-radius != 0 {
border-radius: $button-border-radius;
}
@if $button-padding != 0 {
padding: $button-padding;
}
@if $button-margin != 0 {
margin: $button-margin;
}
@if $button-box-shadow != none {
box-shadow: $button-box-shadow;
}
@if $apply-link-underline { // Override for links if underline is enabled.
text-decoration: none;
}
-webkit-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
cursor: pointer;
&:hover, &:active, &:focus {
background: rgba($button-back-color, $button-hover-back-opacity);
@if $apply-link-hover-fade { // Override for links if hover-fade is enabled.
opacity: 1;
}
}
&:disabled, &[disabled] {
cursor: not-allowed;
opacity: $button-disabled-opacity;
}
}
// Styling for file inputs
$hide-file-inputs: true !default;
@if $hide-file-inputs {
input[type="file"] { // Hide, use labels instead. Hidden inputs like this are still accessible.
border: 0;
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(100%);
clip-path: inset(100%);
}
}
@else {
::-webkit-file-upload-button {
-webkit-appearance: button; // Correct inability to style in iOS and Safari.
font: inherit; // Change font propery to `inherit` in Safari.
}
}
// Button group definition
.#{$button-group-name} {
// Old syntax
display: -webkit-box;
// New syntax
display: -webkit-flex;
display: flex;
border: $button-group-border-style;
@if $button-border-radius != 0 {
border-radius: $button-border-radius;
}
@if $button-group-margin != 0 {
margin: $button-group-margin;
}
@if $button-group-box-shadow != none {
box-shadow: $button-group-box-shadow;
}
button, [type="button"], [type="submit"], [type="reset"],
.#{$button-class-name}, [role="button"] {
margin: 0;
// Old syntax
-webkit-box-flex: 1;
max-width: 100%;
// New syntax
-webkit-flex-grow: 1;
flex-grow: 1;
-webkit-flex-basis: 0;
flex-basis: 0;
text-align: center;
border: 0;
@if $button-border-radius != 0 {
border-radius: 0;
}
@if $button-group-border-style != 0 {
+ button, + [type="button"], + [type="submit"], + [type="reset"],
+ .#{$button-class-name}, + [role="button"] {
border-left: $button-group-border-style;
}
}
@if $button-box-shadow != none {
box-shadow: none;
}
}
}
// Responsiveness for button groups
@media (max-width: #{$button-group-mobile-breakpoint}) {
.#{$button-group-name} {
// Old syntax
-webkit-box-orient: vertical;
// New syntax
-webkit-flex-direction: column;
flex-direction: column;
@if $button-group-border-style !=0 {
button, [type="button"], [type="submit"], [type="reset"],
.#{$button-class-name}, [role="button"] {
+ button, + [type="button"], + [type="submit"], + [type="reset"],
+ .#{$button-class-name}, + [role="button"] {
border: 0;
border-top: $button-group-border-style;
}
}
}
}
}
// Mixin for alternate buttons (button color variants).
// Variables:
// - $button-alt-name : The name of the class used for the alternate button.
// - $button-alt-back-color : The background color of the alternate button.
// - $button-alt-back-opacity : Opacity of the background color of the alternate button.
// - $button-alt-hover-back-opacity : Opacity of the background color of the alternate button on hover.
// - $button-alt-fore-color : (Optional) The text color of the alternate button. Defaults to the text color of the button.
// Notes:
// Due to something like `.button.secondary` being a higher specificity than `a.button` or `a`, no extra rules are
// required for such elements. However rules for the normal button elements are applied in order to not require the
// base class for the button styles.
@mixin make-button-alt-color ($button-alt-name, $button-alt-back-color, $button-alt-back-opacity,
$button-alt-hover-back-opacity, $button-alt-fore-color: $button-fore-color) {
button.#{$button-alt-name}, [type="button"].#{$button-alt-name}, [type="submit"].#{$button-alt-name},
[type="reset"].#{$button-alt-name}, .#{$button-class-name}.#{$button-alt-name}, [role="button"].#{$button-alt-name} {
background: rgba($button-alt-back-color, $button-alt-back-opacity);
@if $button-alt-fore-color != $button-fore-color {
color: $button-alt-fore-color;
}
&:hover, &:active, &:focus {
background: rgba($button-alt-back-color, $button-alt-hover-back-opacity);
}
}
}
// Mixin for alternate button styles (button style variants).
// Variables:
// - $button-alt-name : The name of the class used for the alternate button style.
// - $button-alt-border-style : The border style of the alternate button style.
// - $button-alt-border-radius : Border radius of the alternate button style.
// - $button-alt-padding : Padding of the alternate button style.
// - $button-alt-margin : Margin of the alternate button style.
// Notes:
// Due to something like `.button.small` being a higher specificity than `a.small` or `a`, no extra rules are
// required for such elements. However rules for the normal button elements are applied in order to not require the
// base class for the button styles.
@mixin make-button-alt-style ($button-alt-name, $button-alt-border-style, $button-alt-border-radius,
$button-alt-padding, $button-alt-margin) {
button.#{$button-alt-name}, [type="button"].#{$button-alt-name}, [type="submit"].#{$button-alt-name},
[type="reset"].#{$button-alt-name}, .#{$button-class-name}.#{$button-alt-name}, [role="button"].#{$button-alt-name} {
@if $button-alt-border-style != $button-border-style {
border: $button-alt-border-style;
}
@if $button-alt-border-radius != $button-border-radius {
border-radius: $button-alt-border-radius;
}
@if $button-alt-padding != $button-padding {
padding: $button-alt-padding;
}
@if $button-alt-margin != $button-margin {
margin: $button-alt-margin;
}
}
}
// Definitions for checkboxes and radio button elements.
// Note: both elements are hidden by default and use labels to show their input state.
// Hide both input types - accessible (element is not visible, but screen readers read it normally).
[type="checkbox"], [type="radio"] {
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
position: absolute;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(100%);
clip-path: inset(100%);
}
// Use input-group to setup the style for labels.
.#{$input-group-name} {
// Label styling based on the specifics of the checkbox/radio variables.
[type="checkbox"] + label, [type="radio"] + label {
position: relative;
margin-left: floor($checkbox-size + floor($checkbox-size * 0.25));
// Styling for checkbox/radio box part.
&:before {
//box-sizing: border-box;
display: inline-block;
position: absolute;
bottom: $checkbox-bottom-spacing;
left: 0;
width: $checkbox-size;
height: $checkbox-size;
content: '';
border: $checkbox-border-thickness solid $checkbox-border-color;
@if $checkbox-border-radius != 0 {
border-radius: $checkbox-border-radius;
}
background: $checkbox-back-color;
color: $checkbox-fore-color;
margin-left: -($checkbox-size + ($checkbox-size * 0.25));
}
// Hover, focus, active styling.
&:hover, &:active, &:focus {
&:before {
border-color: $checkbox-focus-border-color;
}
}
}
[type="checkbox"]:focus + label:before, [type="radio"]:focus + label:before {
border-color: $checkbox-focus-border-color;
}
// Make radio button box and fill circular.
[type="radio"] + label {
&:before, &:after {
border-radius: 50%;
}
}
// Disabled and readonly styles.
[type="checkbox"][disabled] + label, [type="radio"][disabled] + label {
cursor: not-allowed;
&:before, &:after {
opacity: $checkbox-disabled-opacity;
}
}
// Fill for checked checkbox/radio elements.
[type="checkbox"]:checked + label, [type="radio"]:checked + label{
&:after {
margin-left: - floor($checkbox-size + floor($checkbox-size * 0.25));
position: absolute;
bottom: floor($checkbox-size * 0.25) + $checkbox-bottom-spacing;
left: floor($checkbox-size * 0.25);
width: floor($checkbox-size * 0.5) + floor($checkbox-border-thickness * 2);
height: floor($checkbox-size * 0.5) + floor($checkbox-border-thickness * 2);
background: $checkbox-fore-color;
content: '';
}
}
}

View file

@ -1,185 +1,185 @@
/*
Definitions for navigation elements.
*/
// Different elements are styled based on the same set of rules.
// Header styling.
$button-class-name: 'button' !default; // Class name for the button-like elements
$header-logo-name: 'logo' !default; // Class name for <header>'s logo
$include-header-sticky: false !default; // Should the sticky class for <header> elements be included
$include-footer-sticky: false !default; // Should the sticky class for <footer> elements be included
header {
display: block; // Correct display for older versions of IE.
height: $header-height;
@if $header-back-color != $back-color {
background: $header-back-color;
}
@if $header-fore-color != $fore-color {
color: $header-fore-color;
}
@if $header-border-style != 0 {
border: $header-border-style;
}
@if $header-margin != 0 {
margin: $header-margin;
}
@if $header-padding != 0 {
padding: $header-padding;
}
@if $header-box-shadow != none {
box-shadow: $header-box-shadow;
}
// Resposniveness for smaller displays, scrolls horizontally.
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
// Header logo styling.
.#{$header-logo-name} {
color: $header-fore-color; // Keep this in case people use SVGs? Is it necessary?
@if $header-logo-font-size != $base-font-size {
font-size: $header-logo-font-size;
}
@if $header-logo-line-height != $base-line-height {
line-height: $header-logo-line-height;
}
@if $header-logo-margin != 0 {
margin: $header-logo-margin;
}
@if $header-logo-padding != 0 {
padding: $header-logo-padding;
}
@if $apply-link-hover-fade {
-webkit-transition: 0s opacity;
transition: 0s opacity;
}
}
// Link styling.
button, [type="button"],
a.#{$button-class-name}, label.#{$button-class-name}, .#{$button-class-name},
a[role="button"], label[role="button"], [role="button"] {
background: $header-back-color; // Apply color regardless to override styling from other things.
color: $header-fore-color;
vertical-align: top; // Alignemt, really important to make this work well.
@if $header-link-margin != 0 {
margin: $header-link-margin;
}
&:hover, &:active, &:focus {
background: $header-link-hover-color;
}
@if $button-box-shadow != none { // Override for buttons when shadow is enabled.
box-shadow: none;
}
@if $button-border-style != 0 { // Override for buttons when border-style is enabled.
border: 0;
}
}
@if $apply-link-underline { // Override for links if underline is enabled.
.#{$header-logo-name}, a.#{$button-class-name}, a[role="button"] {
text-decoration: none;
}
}
}
// Navigation sidebar styling.
nav {
display: block; // Correct display for older versions of IE.
@if $nav-back-color != $back-color {
background: $nav-back-color;
}
@if $nav-fore-color != $fore-color {
color: $nav-fore-color;
}
@if $nav-border-style != 0 {
border: $nav-border-style;
}
@if $nav-border-radius != 0 {
border-radius: $nav-border-radius;
}
@if $nav-margin != 0 {
margin: $nav-margin;
}
@if $nav-padding != 0 {
padding: $nav-padding;
}
@if $nav-box-shadow != none {
box-shadow: $nav-box-shadow;
}
a, a:visited {
display: block;
color: $nav-link-fore-color; // Apply regardless to de-stylize visited links.
}
// Subcategories in navigation.
$nav-sublink-prefix: 'sublink' !default; // Prefix for the subcategory tabs in nav
$nav-sublink-depth: 2 !default; // Amount of subcategory classes to add
$nav-sublink-padding-left: 12px !default; // Left padding to add to subcategories
$nav-include-sublink-bar: false !default; // Should a border be added to the subcategories?
@for $i from 1 through $nav-sublink-depth {
.#{$nav-sublink-prefix}-#{$i} {
padding-left: $i * $nav-sublink-padding-left;
position: relative;
@if $nav-include-sublink-bar {
&:before {
position: absolute;
left: $nav-sublink-bar-left-position;
top: -$nav-sublink-bar-width;
content: '';
height: 100%;
border: $nav-sublink-bar-width solid $nav-sublink-bar-color;
border-left: 0;
}
}
}
}
}
// Footer styling.
footer {
display: block; // Correct display for older versions of IE.
@if $footer-back-color != $back-color {
background: $footer-back-color;
}
@if $footer-fore-color != $fore-color {
color: $footer-fore-color;
}
@if $footer-border-style != 0 {
border: $footer-border-style;
}
@if $footer-margin != 0 {
margin: $footer-margin;
}
@if $footer-padding != 0 {
padding: $footer-padding;
}
font-size: $footer-font-size;
a, a:visited {
color: $footer-link-fore-color;
}
}
@if $include-header-sticky and $include-footer-sticky {
header.#{$header-sticky-name}, footer.#{$footer-sticky-name} {
position: -webkit-sticky;
position: sticky;
z-index: 1101; // Deals with certain problems when combined with cards and tables.
}
header.#{$header-sticky-name} {
top: 0;
}
footer.#{$footer-sticky-name} {
bottom: 0;
}
}
@else if $include-header-sticky {
header.#{$header-sticky-name} {
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 1101; // Deals with certain problems when combined with cards and tables.
}
}
@else if $include-footer-sticky {
footer.#{$footer-sticky-name} {
position: -webkit-sticky;
position: sticky;
bottom: 0;
z-index: 1101; // Deals with certain problems when combined with cards and tables.
}
}
/*
Definitions for navigation elements.
*/
// Different elements are styled based on the same set of rules.
// Header styling.
$button-class-name: 'button' !default; // Class name for the button-like elements
$header-logo-name: 'logo' !default; // Class name for <header>'s logo
$include-header-sticky: false !default; // Should the sticky class for <header> elements be included
$include-footer-sticky: false !default; // Should the sticky class for <footer> elements be included
header {
display: block; // Correct display for older versions of IE.
height: $header-height;
@if $header-back-color != $back-color {
background: $header-back-color;
}
@if $header-fore-color != $fore-color {
color: $header-fore-color;
}
@if $header-border-style != 0 {
border: $header-border-style;
}
@if $header-margin != 0 {
margin: $header-margin;
}
@if $header-padding != 0 {
padding: $header-padding;
}
@if $header-box-shadow != none {
box-shadow: $header-box-shadow;
}
// Resposniveness for smaller displays, scrolls horizontally.
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
// Header logo styling.
.#{$header-logo-name} {
color: $header-fore-color; // Keep this in case people use SVGs? Is it necessary?
@if $header-logo-font-size != $base-font-size {
font-size: $header-logo-font-size;
}
@if $header-logo-line-height != $base-line-height {
line-height: $header-logo-line-height;
}
@if $header-logo-margin != 0 {
margin: $header-logo-margin;
}
@if $header-logo-padding != 0 {
padding: $header-logo-padding;
}
@if $apply-link-hover-fade {
-webkit-transition: 0s opacity;
transition: 0s opacity;
}
}
// Link styling.
button, [type="button"],
a.#{$button-class-name}, label.#{$button-class-name}, .#{$button-class-name},
a[role="button"], label[role="button"], [role="button"] {
background: $header-back-color; // Apply color regardless to override styling from other things.
color: $header-fore-color;
vertical-align: top; // Alignemt, really important to make this work well.
@if $header-link-margin != 0 {
margin: $header-link-margin;
}
&:hover, &:active, &:focus {
background: $header-link-hover-color;
}
@if $button-box-shadow != none { // Override for buttons when shadow is enabled.
box-shadow: none;
}
@if $button-border-style != 0 { // Override for buttons when border-style is enabled.
border: 0;
}
}
@if $apply-link-underline { // Override for links if underline is enabled.
.#{$header-logo-name}, a.#{$button-class-name}, a[role="button"] {
text-decoration: none;
}
}
}
// Navigation sidebar styling.
nav {
display: block; // Correct display for older versions of IE.
@if $nav-back-color != $back-color {
background: $nav-back-color;
}
@if $nav-fore-color != $fore-color {
color: $nav-fore-color;
}
@if $nav-border-style != 0 {
border: $nav-border-style;
}
@if $nav-border-radius != 0 {
border-radius: $nav-border-radius;
}
@if $nav-margin != 0 {
margin: $nav-margin;
}
@if $nav-padding != 0 {
padding: $nav-padding;
}
@if $nav-box-shadow != none {
box-shadow: $nav-box-shadow;
}
a, a:visited {
display: block;
color: $nav-link-fore-color; // Apply regardless to de-stylize visited links.
}
// Subcategories in navigation.
$nav-sublink-prefix: 'sublink' !default; // Prefix for the subcategory tabs in nav
$nav-sublink-depth: 2 !default; // Amount of subcategory classes to add
$nav-sublink-padding-left: 12px !default; // Left padding to add to subcategories
$nav-include-sublink-bar: false !default; // Should a border be added to the subcategories?
@for $i from 1 through $nav-sublink-depth {
.#{$nav-sublink-prefix}-#{$i} {
padding-left: $i * $nav-sublink-padding-left;
position: relative;
@if $nav-include-sublink-bar {
&:before {
position: absolute;
left: $nav-sublink-bar-left-position;
top: -$nav-sublink-bar-width;
content: '';
height: 100%;
border: $nav-sublink-bar-width solid $nav-sublink-bar-color;
border-left: 0;
}
}
}
}
}
// Footer styling.
footer {
display: block; // Correct display for older versions of IE.
@if $footer-back-color != $back-color {
background: $footer-back-color;
}
@if $footer-fore-color != $fore-color {
color: $footer-fore-color;
}
@if $footer-border-style != 0 {
border: $footer-border-style;
}
@if $footer-margin != 0 {
margin: $footer-margin;
}
@if $footer-padding != 0 {
padding: $footer-padding;
}
font-size: $footer-font-size;
a, a:visited {
color: $footer-link-fore-color;
}
}
@if $include-header-sticky and $include-footer-sticky {
header.#{$header-sticky-name}, footer.#{$footer-sticky-name} {
position: -webkit-sticky;
position: sticky;
z-index: 1101; // Deals with certain problems when combined with cards and tables.
}
header.#{$header-sticky-name} {
top: 0;
}
footer.#{$footer-sticky-name} {
bottom: 0;
}
}
@else if $include-header-sticky {
header.#{$header-sticky-name} {
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 1101; // Deals with certain problems when combined with cards and tables.
}
}
@else if $include-footer-sticky {
footer.#{$footer-sticky-name} {
position: -webkit-sticky;
position: sticky;
bottom: 0;
z-index: 1101; // Deals with certain problems when combined with cards and tables.
}
}

View file

@ -1,205 +1,205 @@
/*
Definitions for progress elements and spinners.
*/
// Progress elements use the progress element as their base.
// Default styling for progress. Use mixins for alternate styles.
$progress-max-value: 100 !default; // Arithmetic max value of <progress>
progress {
display: block;
vertical-align: baseline; // Correct vertical alignment in certain browsers.
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
height: $progress-height;
width: 100%;
border: $progress-border-style;
@if $progress-border-radius != 0 {
border-radius: $progress-border-radius;
}
@if $progress-top-bottom-margin != 0 {
margin: $progress-top-bottom-margin auto;
// Check somewhere below for the feature query that allows left and right margins to display properly on newer browsers.
}
@if $progress-box-shadow != none {
box-shadow: $progress-box-shadow;
}
background: $progress-back-color; // Background color of the element (IE 10+ and Firefox).
color: $progress-fore-color; // Foreground of the element (IE 10+).
&::-webkit-progress-value { // Foreground of the element (webkit browsers).
background: $progress-fore-color;
@if $progress-border-radius != 0 {
border-top-left-radius: $progress-border-radius;
border-bottom-left-radius: $progress-border-radius;
}
}
&::-webkit-progress-bar { // Background of the element (webkit browsers).
background: $progress-back-color;
}
&::-moz-progress-bar { // Foreground of the element (Firefox).
background: $progress-fore-color;
@if $progress-border-radius != 0 {
border-top-left-radius: $progress-border-radius;
border-bottom-left-radius: $progress-border-radius;
}
}
&[value="#{$progress-max-value}"] {
&::-webkit-progress-value {
@if $progress-border-radius != 0 {
border-radius: $progress-border-radius;
}
}
&::-moz-progress-bar {
@if $progress-border-radius != 0 {
border-radius: $progress-border-radius;
}
}
}
}
// Feature query that checks if the left and right margins can be applied properly.
@if $progress-left-right-margin != 0 and $progress-left-right-margin != auto {
@supports (width: calc(100% - 2*#{$progress-left-right-margin})) or (width: -webkit-calc(100% - 2*#{$progress-left-right-margin})) {
progress {
width: -webkit-calc(100% - 2*#{$progress-left-right-margin});
width: calc(100% - 2*#{$progress-left-right-margin});
margin: $progress-top-bottom-margin $progress-left-right-margin;
}
}
}
// Mixin for inline progress.
// Variables:
// - $progress-inline-name : The name of the class used for the inline progress.
// - $progress-inline-width : The width of the inline progress.
@mixin make-progress-inline ($progress-inline-name, $progress-inline-width) {
progress.#{$progress-inline-name} {
display: inline-block;
vertical-align: middle; // Align progress bar vertically to look better with text next to it.
@if $progress-inline-width != 100% {
width: $progress-inline-width;
}
}
}
// Mixin for alternate progress (progress color variants).
// Variables:
// - $progress-alt-name : The name of the class used for the alternate progress.
// - $progress-alt-fore-color : The progress bar color of the alternate progress.
// - $progress-alt-back-color : (Optional) The background color of the alternate progress. Defaults to the background color of the progress.
@mixin make-progress-alt-color ($progress-alt-name, $progress-alt-fore-color, $progress-alt-back-color: $progress-back-color) {
progress.#{$progress-alt-name} {
@if $progress-alt-back-color != $progress-back-color {
background: $progress-alt-back-color; // Background color of the element (IE 10+ and Firefox).
&::-webkit-progress-bar { // Background of the element (webkit browsers).
background: $progress-alt-back-color;
}
}
@if $progress-alt-fore-color != $progress-fore-color {
color: $progress-alt-fore-color; // Foreground of the element (IE 10+).
&::-webkit-progress-value { // Foreground of the element (webkit browsers).
background: $progress-alt-fore-color;
}
&::-moz-progress-bar { // Foreground of the element (Firefox).
background: $progress-alt-fore-color;
}
}
}
}
// Mixin for alternate progress styles.
// Variables:
// - $progress-alt-name : The name of the class used for the alternate progress style.
// - $progress-alt-height : The height of the alternate progress style.
// - $progress-alt-top-bottom-margin : (Optional) The top and bottom margin of the alternate progress style. Defaults to the margin of the progress.
// - $progress-alt-left-right-margin : (Optional) The left and right margin of the alternate progress style. Defaults to the margin of the progress.
// - $progress-alt-border-style : (Optional) The border style of the alternate progress style. Defaults to the border style of the progress.
// - $progress-alt-border-radius : (Optional) The border radius of the alternate progress style. Defaults to the border radius of the progress.
// - $progress-alt-box-shadow : (Optional) The box shadow of the alternate progress style. Defaults to the box shadow of the progress.
@mixin make-progress-alt-style ($progress-alt-name, $progress-alt-height,
$progress-alt-top-bottom-margin : $progress-top-bottom-margin, $progress-alt-left-right-margin : $progress-left-right-margin,
$progress-alt-border-style : $progress-border-style, $progress-alt-border-radius : $progress-border-radius,
$progress-alt-box-shadow : $progress-box-shadow) {
progress.#{$progress-alt-name} {
@if $progress-alt-height != $progress-height {
height: $progress-alt-height;
}
width: 100%;
@if $progress-alt-top-bottom-margin != $progress-top-bottom-margin {
margin: $progress-alt-top-bottom-margin auto;
}
@if $progress-alt-border-style != $progress-border-style {
border: $progress-alt-border-style;
}
@if progress-alt-border-radius != $progress-border-radius {
border-radius: $progress-alt-border-radius;
&::-webkit-progress-value {
border-top-left-radius: $progress-alt-border-radius;
border-bottom-left-radius: $progress-alt-border-radius;
}
&::-moz-progress-bar {
border-top-left-radius: $progress-alt-border-radius;
border-bottom-left-radius: $progress-alt-border-radius;
}
&[value="#{$progress-max-value}"] {
&::-webkit-progress-value {
border-radius: $progress-alt-border-radius;
}
&::-moz-progress-bar {
border-radius: $progress-alt-border-radius;
}
}
}
@if $progress-alt-box-shadow != $progress-box-shadow {
box-shadow: $progress-alt-box-shadow;
}
}
// Feature query that checks if the left and right margins can be applied properly.
@if $progress-alt-left-right-margin != $progress-left-right-margin and $progress-alt-left-right-margin != auto and $progress-alt-left-right-margin != 0 {
@supports (width: calc(100% - 2*#{$progress-alt-left-right-margin})) or (width: -webkit-calc(100% - 2*#{$progress-alt-left-right-margin})) {
progress.#{$progress-alt-name} {
width: -webkit-calc(100% - 2*#{$progress-alt-left-right-margin});
width: calc(100% - 2*#{$progress-alt-left-right-margin});
margin: $progress-alt-top-bottom-margin $progress-alt-left-right-margin;
}
}
}
}
// Animation definition for donut spinner
@-webkit-keyframes spinner-donut-anim { 0% { -webkit-transform: rotate(0deg);} 100% { -webkit-transform: rotate(360deg);} }
@keyframes spinner-donut-anim { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }
// Style for donut spinner
.#{$spinner-donut-name} {
display: inline-block;
border: $spinner-donut-border-thickness solid $spinner-donut-back-color;
border-left: $spinner-donut-border-thickness solid $spinner-donut-fore-color;
border-radius: 50%;
width: $spinner-donut-size;
height: $spinner-donut-size;
-webkit-animation: spinner-donut-anim 1.2s linear infinite;
animation: spinner-donut-anim 1.2s linear infinite;
}
// Mixin for alternate donut spinner colors (spinner donut color variants).
// Variables:
// - $spinner-donut-alt-name : The name of the class used for the alternate donut spinner.
// - $spinner-donut-alt-back-color : The background color of the alternate donut spinner.
// - $spinner-donut-alt-fore-color : The foreground color of the alternate donut spinner.
@mixin make-spinner-donut-alt-color ($spinner-donut-alt-name, $spinner-donut-alt-back-color, $spinner-donut-alt-fore-color) {
.#{$spinner-donut-name}.#{$spinner-donut-alt-name} {
border: $spinner-donut-border-thickness solid $spinner-donut-alt-back-color;
border-left: $spinner-donut-border-thickness solid $spinner-donut-alt-fore-color;
}
}
// Mixin for alternate donut spinner styles (spinner donut styles variants).
// Variables:
// - $spinner-donut-alt-name : The name of the class used for the alternate donut spinner style.
// - $spinner-donut-alt-size : The size of the alternate donut spinner style.
// - $spinner-donut-alt-border-thickness : (Optional) The border thickness of the alternate donut spinner style.
// Defaults to the value of $spinner-donut-alt-border-thickness.
@mixin make-spinner-donut-alt-style ($spinner-donut-alt-name, $spinner-donut-alt-size,
$spinner-donut-alt-border-thickness : $spinner-donut-border-thickness) {
.#{$spinner-donut-name}.#{$spinner-donut-alt-name} {
@if $spinner-donut-alt-border-thickness != $spinner-donut-border-thickness {
border-width: $spinner-donut-alt-border-thickness;
}
@if $spinner-donut-alt-size != $spinner-donut-size {
width: $spinner-donut-alt-size;
height: $spinner-donut-alt-size;
}
}
}
/*
Definitions for progress elements and spinners.
*/
// Progress elements use the progress element as their base.
// Default styling for progress. Use mixins for alternate styles.
$progress-max-value: 100 !default; // Arithmetic max value of <progress>
progress {
display: block;
vertical-align: baseline; // Correct vertical alignment in certain browsers.
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
height: $progress-height;
width: 100%;
border: $progress-border-style;
@if $progress-border-radius != 0 {
border-radius: $progress-border-radius;
}
@if $progress-top-bottom-margin != 0 {
margin: $progress-top-bottom-margin auto;
// Check somewhere below for the feature query that allows left and right margins to display properly on newer browsers.
}
@if $progress-box-shadow != none {
box-shadow: $progress-box-shadow;
}
background: $progress-back-color; // Background color of the element (IE 10+ and Firefox).
color: $progress-fore-color; // Foreground of the element (IE 10+).
&::-webkit-progress-value { // Foreground of the element (webkit browsers).
background: $progress-fore-color;
@if $progress-border-radius != 0 {
border-top-left-radius: $progress-border-radius;
border-bottom-left-radius: $progress-border-radius;
}
}
&::-webkit-progress-bar { // Background of the element (webkit browsers).
background: $progress-back-color;
}
&::-moz-progress-bar { // Foreground of the element (Firefox).
background: $progress-fore-color;
@if $progress-border-radius != 0 {
border-top-left-radius: $progress-border-radius;
border-bottom-left-radius: $progress-border-radius;
}
}
&[value="#{$progress-max-value}"] {
&::-webkit-progress-value {
@if $progress-border-radius != 0 {
border-radius: $progress-border-radius;
}
}
&::-moz-progress-bar {
@if $progress-border-radius != 0 {
border-radius: $progress-border-radius;
}
}
}
}
// Feature query that checks if the left and right margins can be applied properly.
@if $progress-left-right-margin != 0 and $progress-left-right-margin != auto {
@supports (width: calc(100% - 2*#{$progress-left-right-margin})) or (width: -webkit-calc(100% - 2*#{$progress-left-right-margin})) {
progress {
width: -webkit-calc(100% - 2*#{$progress-left-right-margin});
width: calc(100% - 2*#{$progress-left-right-margin});
margin: $progress-top-bottom-margin $progress-left-right-margin;
}
}
}
// Mixin for inline progress.
// Variables:
// - $progress-inline-name : The name of the class used for the inline progress.
// - $progress-inline-width : The width of the inline progress.
@mixin make-progress-inline ($progress-inline-name, $progress-inline-width) {
progress.#{$progress-inline-name} {
display: inline-block;
vertical-align: middle; // Align progress bar vertically to look better with text next to it.
@if $progress-inline-width != 100% {
width: $progress-inline-width;
}
}
}
// Mixin for alternate progress (progress color variants).
// Variables:
// - $progress-alt-name : The name of the class used for the alternate progress.
// - $progress-alt-fore-color : The progress bar color of the alternate progress.
// - $progress-alt-back-color : (Optional) The background color of the alternate progress. Defaults to the background color of the progress.
@mixin make-progress-alt-color ($progress-alt-name, $progress-alt-fore-color, $progress-alt-back-color: $progress-back-color) {
progress.#{$progress-alt-name} {
@if $progress-alt-back-color != $progress-back-color {
background: $progress-alt-back-color; // Background color of the element (IE 10+ and Firefox).
&::-webkit-progress-bar { // Background of the element (webkit browsers).
background: $progress-alt-back-color;
}
}
@if $progress-alt-fore-color != $progress-fore-color {
color: $progress-alt-fore-color; // Foreground of the element (IE 10+).
&::-webkit-progress-value { // Foreground of the element (webkit browsers).
background: $progress-alt-fore-color;
}
&::-moz-progress-bar { // Foreground of the element (Firefox).
background: $progress-alt-fore-color;
}
}
}
}
// Mixin for alternate progress styles.
// Variables:
// - $progress-alt-name : The name of the class used for the alternate progress style.
// - $progress-alt-height : The height of the alternate progress style.
// - $progress-alt-top-bottom-margin : (Optional) The top and bottom margin of the alternate progress style. Defaults to the margin of the progress.
// - $progress-alt-left-right-margin : (Optional) The left and right margin of the alternate progress style. Defaults to the margin of the progress.
// - $progress-alt-border-style : (Optional) The border style of the alternate progress style. Defaults to the border style of the progress.
// - $progress-alt-border-radius : (Optional) The border radius of the alternate progress style. Defaults to the border radius of the progress.
// - $progress-alt-box-shadow : (Optional) The box shadow of the alternate progress style. Defaults to the box shadow of the progress.
@mixin make-progress-alt-style ($progress-alt-name, $progress-alt-height,
$progress-alt-top-bottom-margin : $progress-top-bottom-margin, $progress-alt-left-right-margin : $progress-left-right-margin,
$progress-alt-border-style : $progress-border-style, $progress-alt-border-radius : $progress-border-radius,
$progress-alt-box-shadow : $progress-box-shadow) {
progress.#{$progress-alt-name} {
@if $progress-alt-height != $progress-height {
height: $progress-alt-height;
}
width: 100%;
@if $progress-alt-top-bottom-margin != $progress-top-bottom-margin {
margin: $progress-alt-top-bottom-margin auto;
}
@if $progress-alt-border-style != $progress-border-style {
border: $progress-alt-border-style;
}
@if progress-alt-border-radius != $progress-border-radius {
border-radius: $progress-alt-border-radius;
&::-webkit-progress-value {
border-top-left-radius: $progress-alt-border-radius;
border-bottom-left-radius: $progress-alt-border-radius;
}
&::-moz-progress-bar {
border-top-left-radius: $progress-alt-border-radius;
border-bottom-left-radius: $progress-alt-border-radius;
}
&[value="#{$progress-max-value}"] {
&::-webkit-progress-value {
border-radius: $progress-alt-border-radius;
}
&::-moz-progress-bar {
border-radius: $progress-alt-border-radius;
}
}
}
@if $progress-alt-box-shadow != $progress-box-shadow {
box-shadow: $progress-alt-box-shadow;
}
}
// Feature query that checks if the left and right margins can be applied properly.
@if $progress-alt-left-right-margin != $progress-left-right-margin and $progress-alt-left-right-margin != auto and $progress-alt-left-right-margin != 0 {
@supports (width: calc(100% - 2*#{$progress-alt-left-right-margin})) or (width: -webkit-calc(100% - 2*#{$progress-alt-left-right-margin})) {
progress.#{$progress-alt-name} {
width: -webkit-calc(100% - 2*#{$progress-alt-left-right-margin});
width: calc(100% - 2*#{$progress-alt-left-right-margin});
margin: $progress-alt-top-bottom-margin $progress-alt-left-right-margin;
}
}
}
}
// Animation definition for donut spinner
@-webkit-keyframes spinner-donut-anim { 0% { -webkit-transform: rotate(0deg);} 100% { -webkit-transform: rotate(360deg);} }
@keyframes spinner-donut-anim { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }
// Style for donut spinner
.#{$spinner-donut-name} {
display: inline-block;
border: $spinner-donut-border-thickness solid $spinner-donut-back-color;
border-left: $spinner-donut-border-thickness solid $spinner-donut-fore-color;
border-radius: 50%;
width: $spinner-donut-size;
height: $spinner-donut-size;
-webkit-animation: spinner-donut-anim 1.2s linear infinite;
animation: spinner-donut-anim 1.2s linear infinite;
}
// Mixin for alternate donut spinner colors (spinner donut color variants).
// Variables:
// - $spinner-donut-alt-name : The name of the class used for the alternate donut spinner.
// - $spinner-donut-alt-back-color : The background color of the alternate donut spinner.
// - $spinner-donut-alt-fore-color : The foreground color of the alternate donut spinner.
@mixin make-spinner-donut-alt-color ($spinner-donut-alt-name, $spinner-donut-alt-back-color, $spinner-donut-alt-fore-color) {
.#{$spinner-donut-name}.#{$spinner-donut-alt-name} {
border: $spinner-donut-border-thickness solid $spinner-donut-alt-back-color;
border-left: $spinner-donut-border-thickness solid $spinner-donut-alt-fore-color;
}
}
// Mixin for alternate donut spinner styles (spinner donut styles variants).
// Variables:
// - $spinner-donut-alt-name : The name of the class used for the alternate donut spinner style.
// - $spinner-donut-alt-size : The size of the alternate donut spinner style.
// - $spinner-donut-alt-border-thickness : (Optional) The border thickness of the alternate donut spinner style.
// Defaults to the value of $spinner-donut-alt-border-thickness.
@mixin make-spinner-donut-alt-style ($spinner-donut-alt-name, $spinner-donut-alt-size,
$spinner-donut-alt-border-thickness : $spinner-donut-border-thickness) {
.#{$spinner-donut-name}.#{$spinner-donut-alt-name} {
@if $spinner-donut-alt-border-thickness != $spinner-donut-border-thickness {
border-width: $spinner-donut-alt-border-thickness;
}
@if $spinner-donut-alt-size != $spinner-donut-size {
width: $spinner-donut-alt-size;
height: $spinner-donut-alt-size;
}
}
}

View file

@ -1,255 +1,255 @@
/*
Definitions for tabs/horizontal accordions.
*/
// Dependency: This module is somewhat dependent on the grid system.
// Tab styling
$tab-container-name: 'tabs' !default; // Class name for the tabs container
$tab-stacked-name: 'stacked' !default; // Class name for stacked tabs container
.#{$tab-container-name} {
width: 100%;
opacity: 1;
// Old syntax
display: -webkit-box;
-webkit-box-pack: justify;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
@if $tab-container-box-shadow != none {
box-shadow: $tab-container-box-shadow;
}
// Tab label styling
& > label {
// Old syntax
-webkit-box-flex: 1;
// New syntax
-webkit-flex-grow: 1;
flex-grow: 1;
// Make tab labels stay at the top on large displays
-webkit-order: 1;
order: 1;
// Actual styling
display: inline-block;
height: $tab-label-height;
cursor: pointer;
-webkit-transition: background 0.3s ease 0s;
transition: background 0.3s ease 0s;
@if $tab-label-back-color != $back-color {
background: $tab-label-back-color;
}
@if $tab-label-fore-color != $fore-color {
color: $tab-label-fore-color;
}
@if $tab-border-style != 0 {
border: $tab-border-style;
}
@if $tab-label-padding != 0 {
padding: $tab-label-padding;
}
@if $tab-border-radius != 0 { // Style first and last tabs' labels' top corners as needed
&:first-of-type {
border-top-left-radius: $tab-border-radius;
}
&:last-of-type {
border-top-right-radius: $tab-border-radius;
}
}
// Hover styling for tabs' labels
&:hover, &:active, &:focus {
background: rgba($tab-label-back-color, $tab-label-hover-opacity);
}
}
// Tab radio styling
& > [type="radio"], &.#{$tab-stacked-name} > [type="checkbox"] {
display: none;
visibility: hidden;
}
// Tab content styling
& > [type="radio"] + label + div, &.#{$tab-stacked-name} > [type="checkbox"] + label + div {
// New syntax
-webkit-flex-basis: auto;
flex-basis: auto;
// Make tab panels display after all the labels on larger displays
-webkit-order: 2;
order: 2;
// Hide content, while allowing accessibility
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
position: absolute;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(100%);
clip-path: inset(100%);
// Presentation
-webkit-transform: scaleY(0);
transform: scaleY(0);
-webkit-transform-origin: top;
transform-origin: top;
-webkit-transition: -webkit-transform 0.3s ease 0s,
transform 0.3s ease 0s;
transition: -webkit-transform 0.3s ease 0s,
transform 0.3s ease 0s;
// Style for tab labels except the first
@if $tab-border-style != 0 {
& + [type="radio"] + label {
border-left: 0;
}
}
@if $tab-border-radius != 0 {
border-bottom-left-radius: $tab-border-radius;
border-bottom-right-radius: $tab-border-radius;
}
}
@if $tab-border-style != 0 {
&.stacked > [type="checkbox"] + label + div + [type="checkbox"] + label {
border-left: 0;
}
}
// Tab label styling for open tab
& > [type="radio"]:checked + label, &.#{$tab-stacked-name} > [type="checkbox"]:checked + label {
@if $tab-label-selected-back-color != $tab-label-back-color {
background: $tab-label-selected-back-color;
&:hover, &:active, &:focus {
background: rgba($tab-label-selected-back-color, $tab-label-hover-opacity);
}
}
@if $tab-label-selected-fore-color != $tab-label-fore-color {
color: $tab-label-selected-fore-color;
}
}
// Tab content styling (open tab)
& > [type="radio"]:checked + label + div, &.#{$tab-stacked-name} > [type="checkbox"]:checked + label + div {
box-sizing: border-box;
position: relative;
height: $tab-panel-height;
width: 100%;
overflow: auto;
margin: 0;
-webkit-transform: scaleY(1);
transform: scaleY(1);
@if $tab-panel-back-color != $back-color {
background: $tab-panel-back-color;
}
@if $tab-panel-fore-color != $fore-color {
color: $tab-panel-fore-color;
}
@if $tab-border-style != 0 {
border: $tab-border-style;
border-top: 0;
}
@if $tab-panel-padding != 0 {
padding: $tab-panel-padding;
}
// Fix display for some browsers
clip: auto;
-webkit-clip-path: inset(0%);
clip-path: inset(0%);
}
}
// Stacked tabs
.#{$tab-container-name}.#{$tab-stacked-name} {
// Old syntax
-webkit-box-orient: vertical;
// New syntax
-webkit-flex-direction: column;
flex-direction: column;
& > label {
-webkit-order: initial; // Reset order to show stacked tabs properly
order: initial;
@if $tab-border-radius != 0 { // Style first and last tabs' labels' corners as needed
&:last-of-type {
border-top-right-radius: 0;
border-bottom-left-radius: $tab-border-radius;
border-bottom-right-radius: $tab-border-radius;
}
// Keep :first-of-type below :last-of-type to make sure that single collapses get proper radiuses
&:first-of-type {
border-top-right-radius: $tab-border-radius;
}
}
}
@if $tab-border-radius != 0 { // Style the last tabs' label corners when it's open as needed
& > [type="radio"]:checked + label, & > [type="checkbox"]:checked + label {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
& > [type="radio"] + label + div, & > [type="checkbox"] + label + div {
-webkit-order: initial; // Reset order to show stacked tabs properly
order: initial;
// Presentation
-webkit-transform-origin: top;
transform-origin: top;
@if $tab-border-radius != 0 {
border-radius: 0;
}
& + [type="radio"] + label, & + [type="checkbox"] + label {
@if $tab-border-style != 0 {
border: $tab-border-style;
border-top: 0;
}
}
}
& > [type="radio"]:checked + label + div, & > [type="checkbox"]:checked + label + div {
height: auto;
}
@if $tab-border-radius != 0 {
& > [type="radio"] + label + div:last-of-type, & > [type="checkbox"] + label + div:last-of-type {
border-bottom-left-radius: $tab-border-radius;
border-bottom-right-radius: $tab-border-radius;
}
}
}
// Responsiveness
@media (max-width: #{$tab-stacked-breakpoint}) {
.#{$tab-container-name} {
// Old syntax
-webkit-box-orient: vertical;
// New syntax
-webkit-flex-direction: column;
flex-direction: column;
& > label {
-webkit-order: initial; // Reset order to show stacked tabs properly
order: initial;
@if $tab-border-radius != 0 { // Style first and last tabs' labels' corners as needed
&:first-of-type {
border-top-right-radius: $tab-border-radius;
}
&:last-of-type {
border-top-right-radius: 0;
border-bottom-left-radius: $tab-border-radius;
border-bottom-right-radius: $tab-border-radius;
}
}
}
@if $tab-border-radius != 0 { // Style the last tabs' label corners when it's open as needed
& > [type="radio"]:checked + label {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
& > [type="radio"] + label + div {
-webkit-order: initial; // Reset order to show stacked tabs properly
order: initial;
@if $tab-border-radius != 0 {
border-radius: 0;
}
& + [type="radio"] + label {
@if $tab-border-style != 0 {
border: $tab-border-style;
border-top: 0;
}
}
}
@if $tab-border-radius != 0 {
& > [type="radio"] + label + div:last-of-type {
border-bottom-left-radius: $tab-border-radius;
border-bottom-right-radius: $tab-border-radius;
}
}
}
/*
Definitions for tabs/horizontal accordions.
*/
// Dependency: This module is somewhat dependent on the grid system.
// Tab styling
$tab-container-name: 'tabs' !default; // Class name for the tabs container
$tab-stacked-name: 'stacked' !default; // Class name for stacked tabs container
.#{$tab-container-name} {
width: 100%;
opacity: 1;
// Old syntax
display: -webkit-box;
-webkit-box-pack: justify;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
@if $tab-container-box-shadow != none {
box-shadow: $tab-container-box-shadow;
}
// Tab label styling
& > label {
// Old syntax
-webkit-box-flex: 1;
// New syntax
-webkit-flex-grow: 1;
flex-grow: 1;
// Make tab labels stay at the top on large displays
-webkit-order: 1;
order: 1;
// Actual styling
display: inline-block;
height: $tab-label-height;
cursor: pointer;
-webkit-transition: background 0.3s ease 0s;
transition: background 0.3s ease 0s;
@if $tab-label-back-color != $back-color {
background: $tab-label-back-color;
}
@if $tab-label-fore-color != $fore-color {
color: $tab-label-fore-color;
}
@if $tab-border-style != 0 {
border: $tab-border-style;
}
@if $tab-label-padding != 0 {
padding: $tab-label-padding;
}
@if $tab-border-radius != 0 { // Style first and last tabs' labels' top corners as needed
&:first-of-type {
border-top-left-radius: $tab-border-radius;
}
&:last-of-type {
border-top-right-radius: $tab-border-radius;
}
}
// Hover styling for tabs' labels
&:hover, &:active, &:focus {
background: rgba($tab-label-back-color, $tab-label-hover-opacity);
}
}
// Tab radio styling
& > [type="radio"], &.#{$tab-stacked-name} > [type="checkbox"] {
display: none;
visibility: hidden;
}
// Tab content styling
& > [type="radio"] + label + div, &.#{$tab-stacked-name} > [type="checkbox"] + label + div {
// New syntax
-webkit-flex-basis: auto;
flex-basis: auto;
// Make tab panels display after all the labels on larger displays
-webkit-order: 2;
order: 2;
// Hide content, while allowing accessibility
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
position: absolute;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(100%);
clip-path: inset(100%);
// Presentation
-webkit-transform: scaleY(0);
transform: scaleY(0);
-webkit-transform-origin: top;
transform-origin: top;
-webkit-transition: -webkit-transform 0.3s ease 0s,
transform 0.3s ease 0s;
transition: -webkit-transform 0.3s ease 0s,
transform 0.3s ease 0s;
// Style for tab labels except the first
@if $tab-border-style != 0 {
& + [type="radio"] + label {
border-left: 0;
}
}
@if $tab-border-radius != 0 {
border-bottom-left-radius: $tab-border-radius;
border-bottom-right-radius: $tab-border-radius;
}
}
@if $tab-border-style != 0 {
&.stacked > [type="checkbox"] + label + div + [type="checkbox"] + label {
border-left: 0;
}
}
// Tab label styling for open tab
& > [type="radio"]:checked + label, &.#{$tab-stacked-name} > [type="checkbox"]:checked + label {
@if $tab-label-selected-back-color != $tab-label-back-color {
background: $tab-label-selected-back-color;
&:hover, &:active, &:focus {
background: rgba($tab-label-selected-back-color, $tab-label-hover-opacity);
}
}
@if $tab-label-selected-fore-color != $tab-label-fore-color {
color: $tab-label-selected-fore-color;
}
}
// Tab content styling (open tab)
& > [type="radio"]:checked + label + div, &.#{$tab-stacked-name} > [type="checkbox"]:checked + label + div {
box-sizing: border-box;
position: relative;
height: $tab-panel-height;
width: 100%;
overflow: auto;
margin: 0;
-webkit-transform: scaleY(1);
transform: scaleY(1);
@if $tab-panel-back-color != $back-color {
background: $tab-panel-back-color;
}
@if $tab-panel-fore-color != $fore-color {
color: $tab-panel-fore-color;
}
@if $tab-border-style != 0 {
border: $tab-border-style;
border-top: 0;
}
@if $tab-panel-padding != 0 {
padding: $tab-panel-padding;
}
// Fix display for some browsers
clip: auto;
-webkit-clip-path: inset(0%);
clip-path: inset(0%);
}
}
// Stacked tabs
.#{$tab-container-name}.#{$tab-stacked-name} {
// Old syntax
-webkit-box-orient: vertical;
// New syntax
-webkit-flex-direction: column;
flex-direction: column;
& > label {
-webkit-order: initial; // Reset order to show stacked tabs properly
order: initial;
@if $tab-border-radius != 0 { // Style first and last tabs' labels' corners as needed
&:last-of-type {
border-top-right-radius: 0;
border-bottom-left-radius: $tab-border-radius;
border-bottom-right-radius: $tab-border-radius;
}
// Keep :first-of-type below :last-of-type to make sure that single collapses get proper radiuses
&:first-of-type {
border-top-right-radius: $tab-border-radius;
}
}
}
@if $tab-border-radius != 0 { // Style the last tabs' label corners when it's open as needed
& > [type="radio"]:checked + label, & > [type="checkbox"]:checked + label {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
& > [type="radio"] + label + div, & > [type="checkbox"] + label + div {
-webkit-order: initial; // Reset order to show stacked tabs properly
order: initial;
// Presentation
-webkit-transform-origin: top;
transform-origin: top;
@if $tab-border-radius != 0 {
border-radius: 0;
}
& + [type="radio"] + label, & + [type="checkbox"] + label {
@if $tab-border-style != 0 {
border: $tab-border-style;
border-top: 0;
}
}
}
& > [type="radio"]:checked + label + div, & > [type="checkbox"]:checked + label + div {
height: auto;
}
@if $tab-border-radius != 0 {
& > [type="radio"] + label + div:last-of-type, & > [type="checkbox"] + label + div:last-of-type {
border-bottom-left-radius: $tab-border-radius;
border-bottom-right-radius: $tab-border-radius;
}
}
}
// Responsiveness
@media (max-width: #{$tab-stacked-breakpoint}) {
.#{$tab-container-name} {
// Old syntax
-webkit-box-orient: vertical;
// New syntax
-webkit-flex-direction: column;
flex-direction: column;
& > label {
-webkit-order: initial; // Reset order to show stacked tabs properly
order: initial;
@if $tab-border-radius != 0 { // Style first and last tabs' labels' corners as needed
&:first-of-type {
border-top-right-radius: $tab-border-radius;
}
&:last-of-type {
border-top-right-radius: 0;
border-bottom-left-radius: $tab-border-radius;
border-bottom-right-radius: $tab-border-radius;
}
}
}
@if $tab-border-radius != 0 { // Style the last tabs' label corners when it's open as needed
& > [type="radio"]:checked + label {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
& > [type="radio"] + label + div {
-webkit-order: initial; // Reset order to show stacked tabs properly
order: initial;
@if $tab-border-radius != 0 {
border-radius: 0;
}
& + [type="radio"] + label {
@if $tab-border-style != 0 {
border: $tab-border-style;
border-top: 0;
}
}
}
@if $tab-border-radius != 0 {
& > [type="radio"] + label + div:last-of-type {
border-bottom-left-radius: $tab-border-radius;
border-bottom-right-radius: $tab-border-radius;
}
}
}
}

View file

@ -1,301 +1,301 @@
/*
Definitions for the responsive table component.
*/
// The tables use the common table elements and syntax.
// Desktop view.
table {
border-collapse: separate;
border-spacing: 0;
// Apply border style by default always. Otherwise, browser default will be applied.
border: $table-border-style;
@if $table-border-radius != 0 {
border-radius: $table-border-radius;
}
@if $table-margin != 0 {
margin: $table-margin;
}
@if $table-box-shadow != none {
box-shadow: $table-box-shadow;
}
caption {
font-size: $table-caption-font-size;
margin: $table-caption-margin;
}
tr {
padding: $table-row-padding; // Apply always to overwrite default.
}
th, td {
padding: $table-column-padding; // Apply always to overwrite default.
border-left: $table-border-style;
border-top: $table-border-style;
}
td {
@if $table-body-back-color != $back-color {
background: $table-body-back-color;
}
@if $table-body-fore-color != $fore-color {
color: $table-body-fore-color;
}
}
thead th {
border-top: 0;
}
th {
@if $table-head-back-color != $back-color {
background: $table-head-back-color;
}
@if $table-head-fore-color != $fore-color {
color: $table-head-fore-color;
}
}
th:first-child, td:first-child {
border-left: 0;
}
}
// Mobile view for responsive tables.
$table-mobile-breakpoint: 767px !default; // Breakpoint for table mobile view
$table-not-responsive-name: 'preset' !default; // Class name for table non-responsive view
@media (max-width: #{$table-mobile-breakpoint}) {
table:not(.#{$table-not-responsive-name}) {
border-collapse: collapse;
border: 0;
width: 100%;
@if $table-box-shadow != none {
box-shadow: none;
}
// Accessibility (element is not visible, but screen readers read it normally)
thead, th {
border: 0;
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(100%);
clip-path: inset(100%);
}
tr {
display: block;
border: $table-border-style;
@if $table-border-radius != 0 {
border-radius: $table-border-radius;
}
@if $table-box-shadow != none {
box-shadow: $table-box-shadow;
}
@if $table-body-back-color != $back-color {
background: $table-body-back-color;
}
margin-bottom: $table-mobile-card-spacing;
}
td {
display: block;
border: 0;
@if $table-border-style != 0 {
border-bottom: $table-border-style;
}
text-align: right;
}
td:before {
content: attr(#{$table-mobile-card-label});
float: left;
font-weight: $table-mobile-label-font-weight;
}
td:last-child {
@if $table-border-style != 0 {
border-bottom: 0;
}
}
}
}
// Horizontal table view.
$include-horizontal-table: true !default; // Should horizontal tables be included?
$table-horizontal-name: 'horizontal' !default; // Class name for table horizontal view
@if $include-horizontal-table {
@media (min-width: #{$table-horizontal-breakpoint}) {
table.#{$table-horizontal-name} {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 0;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex: 0 1 auto;
flex: 0 1 auto;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
padding: $table-row-padding;
caption {
// Old syntax
-webkit-box-flex: 1;
max-width: 100%;
// New syntax
-webkit-flex: 0 0 100%;
flex: 0 0 100%;
}
thead, tbody {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 0;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row nowrap;
flex-flow: row nowrap;
}
thead {
z-index: 999; // Fixes the visibility of the element.
}
tbody {
overflow: auto; // Allows content scrolling.
// Old syntax
-webkit-box-pack: justify;
// New syntax
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-flex: 1 0 0;
flex: 1 0 0;
}
tr {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 1;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-flex: 1 0 auto;
flex: 1 0 auto;
}
th, td {
width: 100%;
border: $table-border-style; // Apply to overwrite.
@if $table-border-style != 0 {
& + th, & + td {
border-top: 0;
}
}
}
th {
text-align: right;
}
thead {
tr:first-child {
padding-left: 0;
}
}
tbody {
tr:first-child > td {
padding-left: 2 * $table-column-padding; // Fixes padding for the first column of data.
}
}
}
}
// Horizontal table view for non-responsive tables. - Apply over breakpoint when non-responsive.
@media (max-width: #{$table-mobile-breakpoint}) {
table.#{$table-horizontal-name}.#{$table-not-responsive-name} {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 0;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex: 0 1 auto;
flex: 0 1 auto;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
caption {
// Old syntax
-webkit-box-flex: 1;
max-width: 100%;
// New syntax
-webkit-flex: 0 0 100%;
flex: 0 0 100%;
}
thead, tbody {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 0;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row nowrap;
flex-flow: row nowrap;
}
thead {
z-index: 999; // Fixes the visibility of the element.
}
tbody {
overflow: auto;
// Old syntax
-webkit-box-pack: justify;
// New syntax
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-flex: 1 0 0;
flex: 1 0 0;
}
tr {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 1;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-flex: 1 0 auto;
flex: 1 0 auto;
}
th, td {
width: 100%;
border: $table-border-style; // Apply to overwrite.
@if $table-border-style != 0 {
& + th, & + td {
border-top: 0;
}
}
}
th {
text-align: right;
}
tbody {
tr:first-child > td {
padding-left: 2 * $table-column-padding; // Fixes padding for the first column of data.
}
}
}
}
}
// Striped tables.
$table-striped-name: 'striped' !default; // Class name for striped table
table.#{$table-striped-name} {
tr:nth-of-type(2n) > td {
background: $table-striped-alt-body-back-color;
}
}
// Responsiveness for striped tables.
@media (max-width: #{$table-mobile-breakpoint}) {
table.#{$table-striped-name}:not(.#{$table-not-responsive-name}) {
tr:nth-of-type(2n) {
background: $table-striped-alt-body-back-color;
}
}
}
/*
Definitions for the responsive table component.
*/
// The tables use the common table elements and syntax.
// Desktop view.
table {
border-collapse: separate;
border-spacing: 0;
// Apply border style by default always. Otherwise, browser default will be applied.
border: $table-border-style;
@if $table-border-radius != 0 {
border-radius: $table-border-radius;
}
@if $table-margin != 0 {
margin: $table-margin;
}
@if $table-box-shadow != none {
box-shadow: $table-box-shadow;
}
caption {
font-size: $table-caption-font-size;
margin: $table-caption-margin;
}
tr {
padding: $table-row-padding; // Apply always to overwrite default.
}
th, td {
padding: $table-column-padding; // Apply always to overwrite default.
border-left: $table-border-style;
border-top: $table-border-style;
}
td {
@if $table-body-back-color != $back-color {
background: $table-body-back-color;
}
@if $table-body-fore-color != $fore-color {
color: $table-body-fore-color;
}
}
thead th {
border-top: 0;
}
th {
@if $table-head-back-color != $back-color {
background: $table-head-back-color;
}
@if $table-head-fore-color != $fore-color {
color: $table-head-fore-color;
}
}
th:first-child, td:first-child {
border-left: 0;
}
}
// Mobile view for responsive tables.
$table-mobile-breakpoint: 767px !default; // Breakpoint for table mobile view
$table-not-responsive-name: 'preset' !default; // Class name for table non-responsive view
@media (max-width: #{$table-mobile-breakpoint}) {
table:not(.#{$table-not-responsive-name}) {
border-collapse: collapse;
border: 0;
width: 100%;
@if $table-box-shadow != none {
box-shadow: none;
}
// Accessibility (element is not visible, but screen readers read it normally)
thead, th {
border: 0;
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
clip: rect(0 0 0 0);
-webkit-clip-path: inset(100%);
clip-path: inset(100%);
}
tr {
display: block;
border: $table-border-style;
@if $table-border-radius != 0 {
border-radius: $table-border-radius;
}
@if $table-box-shadow != none {
box-shadow: $table-box-shadow;
}
@if $table-body-back-color != $back-color {
background: $table-body-back-color;
}
margin-bottom: $table-mobile-card-spacing;
}
td {
display: block;
border: 0;
@if $table-border-style != 0 {
border-bottom: $table-border-style;
}
text-align: right;
}
td:before {
content: attr(#{$table-mobile-card-label});
float: left;
font-weight: $table-mobile-label-font-weight;
}
td:last-child {
@if $table-border-style != 0 {
border-bottom: 0;
}
}
}
}
// Horizontal table view.
$include-horizontal-table: true !default; // Should horizontal tables be included?
$table-horizontal-name: 'horizontal' !default; // Class name for table horizontal view
@if $include-horizontal-table {
@media (min-width: #{$table-horizontal-breakpoint}) {
table.#{$table-horizontal-name} {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 0;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex: 0 1 auto;
flex: 0 1 auto;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
padding: $table-row-padding;
caption {
// Old syntax
-webkit-box-flex: 1;
max-width: 100%;
// New syntax
-webkit-flex: 0 0 100%;
flex: 0 0 100%;
}
thead, tbody {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 0;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row nowrap;
flex-flow: row nowrap;
}
thead {
z-index: 999; // Fixes the visibility of the element.
}
tbody {
overflow: auto; // Allows content scrolling.
// Old syntax
-webkit-box-pack: justify;
// New syntax
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-flex: 1 0 0;
flex: 1 0 0;
}
tr {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 1;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-flex: 1 0 auto;
flex: 1 0 auto;
}
th, td {
width: 100%;
border: $table-border-style; // Apply to overwrite.
@if $table-border-style != 0 {
& + th, & + td {
border-top: 0;
}
}
}
th {
text-align: right;
}
thead {
tr:first-child {
padding-left: 0;
}
}
tbody {
tr:first-child > td {
padding-left: 2 * $table-column-padding; // Fixes padding for the first column of data.
}
}
}
}
// Horizontal table view for non-responsive tables. - Apply over breakpoint when non-responsive.
@media (max-width: #{$table-mobile-breakpoint}) {
table.#{$table-horizontal-name}.#{$table-not-responsive-name} {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 0;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex: 0 1 auto;
flex: 0 1 auto;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
caption {
// Old syntax
-webkit-box-flex: 1;
max-width: 100%;
// New syntax
-webkit-flex: 0 0 100%;
flex: 0 0 100%;
}
thead, tbody {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 0;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row nowrap;
flex-flow: row nowrap;
}
thead {
z-index: 999; // Fixes the visibility of the element.
}
tbody {
overflow: auto;
// Old syntax
-webkit-box-pack: justify;
// New syntax
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-flex: 1 0 0;
flex: 1 0 0;
}
tr {
// Old syntax
display: -webkit-box;
-webkit-box-flex: 1;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
// New syntax
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-flex: 1 0 auto;
flex: 1 0 auto;
}
th, td {
width: 100%;
border: $table-border-style; // Apply to overwrite.
@if $table-border-style != 0 {
& + th, & + td {
border-top: 0;
}
}
}
th {
text-align: right;
}
tbody {
tr:first-child > td {
padding-left: 2 * $table-column-padding; // Fixes padding for the first column of data.
}
}
}
}
}
// Striped tables.
$table-striped-name: 'striped' !default; // Class name for striped table
table.#{$table-striped-name} {
tr:nth-of-type(2n) > td {
background: $table-striped-alt-body-back-color;
}
}
// Responsiveness for striped tables.
@media (max-width: #{$table-mobile-breakpoint}) {
table.#{$table-striped-name}:not(.#{$table-not-responsive-name}) {
tr:nth-of-type(2n) {
background: $table-striped-alt-body-back-color;
}
}
}

View file

@ -1,237 +1,237 @@
/*
Definitions for utilities and helper classes.
*/
// Hidden elements class. ATTENTION: Uses !important.
.#{$hidden-name}{
display: none !important;
}
// Visually hidden elements class. ATTENTION: Uses !important.
.#{$visually-hidden-name} {
position: absolute !important;
width: 1px !important;
height: 1px !important;
margin: -1px !important;
border: 0 !important;
padding: 0 !important;
clip: rect(0 0 0 0) !important;
-webkit-clip-path: inset(100%) !important;
clip-path: inset(100%) !important;
overflow: hidden !important;
}
// Breadcrumbs
ul.#{$breadcrumbs-name} {
// Old syntax
display: -webkit-box;
// New syntax
display: -webkit-flex;
display: flex;
list-style: none;
// Apply margin from styling
@if $breadcrumbs-margin != 0 {
margin: $breadcrumbs-margin;
}
@else { // Reset margins from list styling
margin-left: 0;
margin-right: 0;
}
padding: 0; // Remove unnecessary left and right empty space
@if $breadcrumbs-border-style !=0 {
border: $breadcrumbs-border-style;
}
@if $breadcrumbs-border-radius != 0 {
border-radius: $breadcrumbs-border-radius;
}
@if $breadcrumbs-box-shadow != none {
box-shadow: $breadcrumbs-box-shadow;
}
li {
// Old syntax
-webkit-box-flex: 1;
max-width: 100%;
// New syntax
-webkit-flex-grow: 1;
flex-grow: 1;
-webkit-flex-basis: 0;
flex-basis: 0;
position: relative;
text-align: center;
background: $breadcrumbs-back-color;
height: $breadcrumbs-height;
line-height: $breadcrumbs-height;
margin-right: ($breadcrumbs-height/2) + $breadcrumbs-separator-width;
&:before, &:after {
content: "";
position: absolute;
top: 0;
width: 0;
height: 0;
border: 0 solid $breadcrumbs-back-color;
border-width: ($breadcrumbs-height/2) ceil($breadcrumbs-height/4);
}
&:before {
left: -($breadcrumbs-height/2);
border-left-color: transparent;
}
&:after {
left: 100%;
border-color: transparent;
border-left-color: $breadcrumbs-back-color;
}
&:first-child {
&:before {
border: 0;
}
}
&:last-child {
margin-right: 0;
&:after {
border: 0;
}
}
}
}
// Close icon
.#{$close-icon-name}{
display: inline-block;
width: 0.75em;
height: 0.75em;
position: relative;
border-radius: 1em;
font-size: $close-icon-size;
text-overflow: clip;
background: rgba($close-icon-back-color,0);
vertical-align: top;
cursor: pointer;
-webkit-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
&:hover, &:active, &:focus {
background: rgba($close-icon-back-color,1);
}
&:before, &:after {
display: inline-block;
width: 0.45em;
height: 0.1em;
position: absolute;
content: "";
top: 0.33em;
left: 0.155em;
text-overflow: clip;
background: $close-icon-fore-color;
}
&:before {
-webkit-transform: rotateZ(45deg);
transform: rotateZ(45deg);
}
&:after {
-webkit-transform: rotateZ(-45deg);
transform: rotateZ(-45deg);
}
}
// Generic border mixin. ATTENTION: Uses !important.
// Variables:
// - $border-generic-name : The name of the class used for the generic border.
@mixin make-border-generic ($border-generic-name) {
.#{$border-generic-name} {
border: 1px solid rgba(0,0,0, 0.25) !important;
}
}
// Generic radial border mixin. ATTENTION: Uses !important.
// Variables:
// - $border-radial-name : The name of the class used for the radial border.
// - $border-radial-radius : The border radius used for the radial border.
@mixin make-border-radial-style ($border-radial-name, $border-radial-radius) {
.#{$border-radial-name} {
border-radius: $border-radial-radius !important;
}
}
// Generic box shadow mixin. ATTENTION: Uses !important.
// Variables:
// - $box-shadow-name : The name of the class used for the generic box shadow.
// - $box-shadow-value : The box shadow value of the generic box shadow.
@mixin make-box-shadow-generic ($box-shadow-name, $box-shadow-value) {
.#{$box-shadow-name} {
box-shadow: $box-shadow-value !important;
}
}
// Responsive margin mixin. ATTENTION: Uses !important.
// Variables:
// - $margin-name : The name of the class used for the responsive margin.
// - $margin-medium-breakpoint : Medium screen breakpoint for the responsive margin.
// - $margin-large-breakpoint : Large screen breakpoint for the responsive margin.
// - $margin-small-value : Responsive margin value for smaller screens.
// - $margin-medium-value : Responsive margin value for medium screens.
// - $margin-large-value : Responsive margin value for large screens.
@mixin make-margin-responsive ($margin-name, $margin-medium-breakpoint,
$margin-large-breakpoint, $margin-small-value, $margin-medium-value,
$margin-large-value) {
.#{$margin-name} {
margin: $margin-small-value !important;
}
@media (min-width: #{$margin-medium-breakpoint}) {
.#{$margin-name} {
margin: $margin-medium-value !important;
}
}
@media (min-width: #{$margin-large-breakpoint}) {
.#{$margin-name} {
margin: $margin-large-value !important;
}
}
}
// Responsive padding mixin. ATTENTION: Uses !important.
// Variables:
// - $padding-name : The name of the class used for the responsive padding.
// - $padding-medium-breakpoint : Medium screen breakpoint for the responsive padding.
// - $padding-large-breakpoint : Large screen breakpoint for the responsive padding.
// - $padding-small-value : Responsive padding value for smaller screens.
// - $padding-medium-value : Responsive padding value for medium screens.
// - $padding-large-value : Responsive padding value for large screens.
@mixin make-padding-responsive ($padding-name, $padding-medium-breakpoint,
$padding-large-breakpoint, $padding-small-value, $padding-medium-value,
$padding-large-value) {
.#{$padding-name} {
padding: $padding-small-value !important;
}
@media (min-width: #{$padding-medium-breakpoint}) {
.#{$padding-name} {
padding: $padding-medium-value !important;
}
}
@media (min-width: #{$padding-large-breakpoint}) {
.#{$padding-name} {
padding: $padding-large-value !important;
}
}
}
$include-floats: false !default; // Should floats be included?
$include-clearfix: false !default; // Should clearfix be included?
$include-center-block: false !default; // Should center block be included?
// Floats. ATTENTION: Uses !important.
// NOTE: Might be obsolete and not play well with others.
@if $include-floats {
.#{$float-prefix}-left {
float: left !important;
}
.#{$float-prefix}-right {
float: right !important;
}
}
// Clearfix mixin. ATTENTION: Uses !important.
// NOTE: Might be obsolete and not play well with others.
@if $include-clearfix {
.#{$clearfix-name} {
&:before, &:after {
content: ' ' !important;
display: table !important;
clear: both !important;
}
}
}
// Center block. ATTENTION: Uses !important.
@if $include-center-block {
.#{$center-block-name} {
display: block !important;
margin-left: auto !important;
margin-right: auto !important;
}
}
/*
Definitions for utilities and helper classes.
*/
// Hidden elements class. ATTENTION: Uses !important.
.#{$hidden-name}{
display: none !important;
}
// Visually hidden elements class. ATTENTION: Uses !important.
.#{$visually-hidden-name} {
position: absolute !important;
width: 1px !important;
height: 1px !important;
margin: -1px !important;
border: 0 !important;
padding: 0 !important;
clip: rect(0 0 0 0) !important;
-webkit-clip-path: inset(100%) !important;
clip-path: inset(100%) !important;
overflow: hidden !important;
}
// Breadcrumbs
ul.#{$breadcrumbs-name} {
// Old syntax
display: -webkit-box;
// New syntax
display: -webkit-flex;
display: flex;
list-style: none;
// Apply margin from styling
@if $breadcrumbs-margin != 0 {
margin: $breadcrumbs-margin;
}
@else { // Reset margins from list styling
margin-left: 0;
margin-right: 0;
}
padding: 0; // Remove unnecessary left and right empty space
@if $breadcrumbs-border-style !=0 {
border: $breadcrumbs-border-style;
}
@if $breadcrumbs-border-radius != 0 {
border-radius: $breadcrumbs-border-radius;
}
@if $breadcrumbs-box-shadow != none {
box-shadow: $breadcrumbs-box-shadow;
}
li {
// Old syntax
-webkit-box-flex: 1;
max-width: 100%;
// New syntax
-webkit-flex-grow: 1;
flex-grow: 1;
-webkit-flex-basis: 0;
flex-basis: 0;
position: relative;
text-align: center;
background: $breadcrumbs-back-color;
height: $breadcrumbs-height;
line-height: $breadcrumbs-height;
margin-right: ($breadcrumbs-height/2) + $breadcrumbs-separator-width;
&:before, &:after {
content: "";
position: absolute;
top: 0;
width: 0;
height: 0;
border: 0 solid $breadcrumbs-back-color;
border-width: ($breadcrumbs-height/2) ceil($breadcrumbs-height/4);
}
&:before {
left: -($breadcrumbs-height/2);
border-left-color: transparent;
}
&:after {
left: 100%;
border-color: transparent;
border-left-color: $breadcrumbs-back-color;
}
&:first-child {
&:before {
border: 0;
}
}
&:last-child {
margin-right: 0;
&:after {
border: 0;
}
}
}
}
// Close icon
.#{$close-icon-name}{
display: inline-block;
width: 0.75em;
height: 0.75em;
position: relative;
border-radius: 1em;
font-size: $close-icon-size;
text-overflow: clip;
background: rgba($close-icon-back-color,0);
vertical-align: top;
cursor: pointer;
-webkit-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
&:hover, &:active, &:focus {
background: rgba($close-icon-back-color,1);
}
&:before, &:after {
display: inline-block;
width: 0.45em;
height: 0.1em;
position: absolute;
content: "";
top: 0.33em;
left: 0.155em;
text-overflow: clip;
background: $close-icon-fore-color;
}
&:before {
-webkit-transform: rotateZ(45deg);
transform: rotateZ(45deg);
}
&:after {
-webkit-transform: rotateZ(-45deg);
transform: rotateZ(-45deg);
}
}
// Generic border mixin. ATTENTION: Uses !important.
// Variables:
// - $border-generic-name : The name of the class used for the generic border.
@mixin make-border-generic ($border-generic-name) {
.#{$border-generic-name} {
border: 1px solid rgba(0,0,0, 0.25) !important;
}
}
// Generic radial border mixin. ATTENTION: Uses !important.
// Variables:
// - $border-radial-name : The name of the class used for the radial border.
// - $border-radial-radius : The border radius used for the radial border.
@mixin make-border-radial-style ($border-radial-name, $border-radial-radius) {
.#{$border-radial-name} {
border-radius: $border-radial-radius !important;
}
}
// Generic box shadow mixin. ATTENTION: Uses !important.
// Variables:
// - $box-shadow-name : The name of the class used for the generic box shadow.
// - $box-shadow-value : The box shadow value of the generic box shadow.
@mixin make-box-shadow-generic ($box-shadow-name, $box-shadow-value) {
.#{$box-shadow-name} {
box-shadow: $box-shadow-value !important;
}
}
// Responsive margin mixin. ATTENTION: Uses !important.
// Variables:
// - $margin-name : The name of the class used for the responsive margin.
// - $margin-medium-breakpoint : Medium screen breakpoint for the responsive margin.
// - $margin-large-breakpoint : Large screen breakpoint for the responsive margin.
// - $margin-small-value : Responsive margin value for smaller screens.
// - $margin-medium-value : Responsive margin value for medium screens.
// - $margin-large-value : Responsive margin value for large screens.
@mixin make-margin-responsive ($margin-name, $margin-medium-breakpoint,
$margin-large-breakpoint, $margin-small-value, $margin-medium-value,
$margin-large-value) {
.#{$margin-name} {
margin: $margin-small-value !important;
}
@media (min-width: #{$margin-medium-breakpoint}) {
.#{$margin-name} {
margin: $margin-medium-value !important;
}
}
@media (min-width: #{$margin-large-breakpoint}) {
.#{$margin-name} {
margin: $margin-large-value !important;
}
}
}
// Responsive padding mixin. ATTENTION: Uses !important.
// Variables:
// - $padding-name : The name of the class used for the responsive padding.
// - $padding-medium-breakpoint : Medium screen breakpoint for the responsive padding.
// - $padding-large-breakpoint : Large screen breakpoint for the responsive padding.
// - $padding-small-value : Responsive padding value for smaller screens.
// - $padding-medium-value : Responsive padding value for medium screens.
// - $padding-large-value : Responsive padding value for large screens.
@mixin make-padding-responsive ($padding-name, $padding-medium-breakpoint,
$padding-large-breakpoint, $padding-small-value, $padding-medium-value,
$padding-large-value) {
.#{$padding-name} {
padding: $padding-small-value !important;
}
@media (min-width: #{$padding-medium-breakpoint}) {
.#{$padding-name} {
padding: $padding-medium-value !important;
}
}
@media (min-width: #{$padding-large-breakpoint}) {
.#{$padding-name} {
padding: $padding-large-value !important;
}
}
}
$include-floats: false !default; // Should floats be included?
$include-clearfix: false !default; // Should clearfix be included?
$include-center-block: false !default; // Should center block be included?
// Floats. ATTENTION: Uses !important.
// NOTE: Might be obsolete and not play well with others.
@if $include-floats {
.#{$float-prefix}-left {
float: left !important;
}
.#{$float-prefix}-right {
float: right !important;
}
}
// Clearfix mixin. ATTENTION: Uses !important.
// NOTE: Might be obsolete and not play well with others.
@if $include-clearfix {
.#{$clearfix-name} {
&:before, &:after {
content: ' ' !important;
display: table !important;
clear: both !important;
}
}
}
// Center block. ATTENTION: Uses !important.
@if $include-center-block {
.#{$center-block-name} {
display: block !important;
margin-left: auto !important;
margin-right: auto !important;
}
}