1
0
mirror of https://github.com/Chalarangelo/mini.css.git synced 2025-08-06 22:06:30 +02:00

Card module cleanup

This commit is contained in:
Angelos Chalaris
2016-11-10 11:10:18 +02:00
parent a3774f3c03
commit 99b5454a3a
6 changed files with 415 additions and 415 deletions

406
dist/mini-default.css vendored
View File

@@ -483,69 +483,54 @@ a {
.col-lg-offset-11 { .col-lg-offset-11 {
margin-left: 91.66667%; } } margin-left: 91.66667%; } }
table { header {
border-collapse: separate; display: block;
border-spacing: 0; height: 36px;
border: 1px solid #bdbdbd; background: #263238;
border-radius: 2px; color: #fafafa;
margin: 0 auto; } padding: 2px 8px;
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden; }
header .logo {
color: #fafafa;
font-size: 1.75em;
line-height: 1.2;
margin: 1px 6px 1px 1px; }
header button, header [type="button"], header a.button, header label.button, header .button {
background: #263238;
color: #fafafa;
vertical-align: top;
margin: 2px 0 0; }
header button:hover, header button:active, header button:focus, header [type="button"]:hover, header [type="button"]:active, header [type="button"]:focus, header a.button:hover, header a.button:active, header a.button:focus, header label.button:hover, header label.button:active, header label.button:focus, header .button:hover, header .button:active, header .button:focus {
background: #37474f; }
header .logo, header a.button {
text-decoration: none; }
caption { nav {
font-size: 1.5em; display: block;
margin: 6px 0 12px; } background: #eceff1;
border-radius: 1px;
tr { margin: 2px;
padding: 6px; } padding: 4px 4px 4px 16px; }
nav a, nav a:visited {
th, td {
padding: 10px;
border-left: 1px solid #bdbdbd;
border-top: 1px solid #bdbdbd; }
th {
border-top: 0;
background: #eceff1; }
th:first-child, td:first-child {
border-left: 0; }
@media (max-width: 768px) {
table {
border-collapse: collapse;
border: 0;
width: 100%; }
thead {
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; display: block;
border: 1px solid #bdbdbd; color: #0277bd; }
border-radius: 2px; nav .sublink-1 {
margin-bottom: 10px; } padding-left: 12px; }
nav .sublink-2 {
padding-left: 24px; }
td { footer {
display: block; display: block;
border: 0; background: #263238;
border-bottom: 1px solid #bdbdbd; color: #fafafa;
text-align: right; } margin: 18px 0 0;
padding: 22px 10px 12px;
font-size: 85%; }
footer a, footer a:visited {
color: #039be5; }
td:before {
content: attr(data-label);
float: left;
font-weight: 700; }
td:last-child {
border-bottom: 0; } }
form { form {
background: #eceff1; background: #eceff1;
border: 1px solid #90a4ae; border: 1px solid #90a4ae;
@@ -711,117 +696,69 @@ input[type="file"] {
background: #212121; background: #212121;
content: ''; } content: ''; }
header { table {
display: block; border-collapse: separate;
height: 36px; border-spacing: 0;
background: #263238;
color: #fafafa;
padding: 2px 8px;
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden; }
header .logo {
color: #fafafa;
font-size: 1.75em;
line-height: 1.2;
margin: 1px 6px 1px 1px; }
header button, header [type="button"], header a.button, header label.button, header .button {
background: #263238;
color: #fafafa;
vertical-align: top;
margin: 2px 0 0; }
header button:hover, header button:active, header button:focus, header [type="button"]:hover, header [type="button"]:active, header [type="button"]:focus, header a.button:hover, header a.button:active, header a.button:focus, header label.button:hover, header label.button:active, header label.button:focus, header .button:hover, header .button:active, header .button:focus {
background: #37474f; }
header .logo, header a.button {
text-decoration: none; }
nav {
display: block;
background: #eceff1;
border-radius: 1px;
margin: 2px;
padding: 4px 4px 4px 16px; }
nav a, nav a:visited {
display: block;
color: #0277bd; }
nav .sublink-1 {
padding-left: 12px; }
nav .sublink-2 {
padding-left: 24px; }
footer {
display: block;
background: #263238;
color: #fafafa;
margin: 18px 0 0;
padding: 22px 10px 12px;
font-size: 85%; }
footer a, footer a:visited {
color: #039be5; }
mark {
background: #0277bd;
color: #fafafa;
font-size: 95%;
line-height: 1;
padding: 1px; }
.alert {
display: block;
max-width: 100%;
background: #eeeeee;
border: 1px solid #bdbdbd; border: 1px solid #bdbdbd;
border-radius: 2px; border-radius: 2px;
margin: 1px 10px; margin: 0 auto; }
padding: 12px 16px; }
progress { caption {
display: block; font-size: 1.5em;
vertical-align: baseline; margin: 6px 0 12px; }
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 100%;
height: 10px;
border: 0;
border-radius: 1px;
margin: 1px auto;
background: #f5f5f5;
color: #01579b; }
progress::-webkit-progress-value {
background: #01579b;
border-top-left-radius: 1px;
border-bottom-left-radius: 1px; }
progress::-webkit-progress-bar {
background: #f5f5f5; }
progress::-moz-progress-bar {
background: #01579b;
border-top-left-radius: 1px;
border-bottom-left-radius: 1px; }
progress[value="100"]::-webkit-progress-value {
border-radius: 1px; }
progress[value="100"]::-moz-progress-bar {
border-radius: 1px; }
@-webkit-keyframes spinner-donut-anim { tr {
0% { padding: 6px; }
-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;
border-left: 4px solid #1565c0;
border-radius: 50%;
width: 20px;
height: 20px;
animation: spinner-donut-anim 1.2s linear infinite; }
th, td {
padding: 10px;
border-left: 1px solid #bdbdbd;
border-top: 1px solid #bdbdbd; }
th {
border-top: 0;
background: #eceff1; }
th:first-child, td:first-child {
border-left: 0; }
@media (max-width: 768px) {
table {
border-collapse: collapse;
border: 0;
width: 100%; }
thead {
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: 1px solid #bdbdbd;
border-radius: 2px;
margin-bottom: 10px; }
td {
display: block;
border: 0;
border-bottom: 1px solid #bdbdbd;
text-align: right; }
td:before {
content: attr(data-label);
float: left;
font-weight: 700; }
td:last-child {
border-bottom: 0; } }
.card { .card {
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
@@ -858,7 +795,7 @@ progress {
.card > .section:last-child { .card > .section:last-child {
border-bottom: 0; } border-bottom: 0; }
@media only screen and (min-width: 320px) { @media (min-width: 320px) {
.card { .card {
max-width: 320px; } } max-width: 320px; } }
.tabs { .tabs {
@@ -996,6 +933,69 @@ progress {
.tabs > [type="radio"] + label + div:last-of-type { .tabs > [type="radio"] + label + div:last-of-type {
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px; } } border-bottom-right-radius: 2px; } }
mark {
background: #0277bd;
color: #fafafa;
font-size: 95%;
line-height: 1;
padding: 1px; }
.alert {
display: block;
max-width: 100%;
background: #eeeeee;
border: 1px solid #bdbdbd;
border-radius: 2px;
margin: 1px 10px;
padding: 12px 16px; }
progress {
display: block;
vertical-align: baseline;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 100%;
height: 10px;
border: 0;
border-radius: 1px;
margin: 1px auto;
background: #f5f5f5;
color: #01579b; }
progress::-webkit-progress-value {
background: #01579b;
border-top-left-radius: 1px;
border-bottom-left-radius: 1px; }
progress::-webkit-progress-bar {
background: #f5f5f5; }
progress::-moz-progress-bar {
background: #01579b;
border-top-left-radius: 1px;
border-bottom-left-radius: 1px; }
progress[value="100"]::-webkit-progress-value {
border-radius: 1px; }
progress[value="100"]::-moz-progress-bar {
border-radius: 1px; }
@-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;
border-left: 4px solid #1565c0;
border-radius: 50%;
width: 20px;
height: 20px;
animation: spinner-donut-anim 1.2s linear infinite; }
button.primary, [type="button"].primary, [type="submit"].primary, button.primary, [type="button"].primary, [type="submit"].primary,
[type="reset"].primary, .button.primary { [type="reset"].primary, .button.primary {
background: #1565c0; background: #1565c0;
@@ -1037,6 +1037,43 @@ button.large, [type="button"].large, [type="submit"].large,
padding: 10px 15px; padding: 10px 15px;
margin: 7px; } margin: 7px; }
.card.large {
max-width: 480px; }
.card.small {
max-width: 160px; }
.card.fluid {
max-width: 100%; }
.card.primary {
background: #e1f5fe;
color: #263238;
border: 1px solid #01579b; }
.card > .section.dark {
background: #bdbdbd; }
.card > .section.primary {
background: #0277bd; }
.card > .section.double-padded {
padding: 12px 16px 12px; }
.row.cards {
-webkit-box-pack: justify;
-webkit-justify-content: space-around;
justify-content: space-around; }
.spinner-donut.secondary {
border: 4px solid #ffebee;
border-left: 4px solid #c62828; }
.row.cards {
-webkit-box-pack: justify;
-webkit-justify-content: space-around;
justify-content: space-around; }
mark.secondary { mark.secondary {
background: #f44336; } background: #f44336; }
@@ -1091,43 +1128,6 @@ progress.nano {
border: 4px solid #e8f5e9; border: 4px solid #e8f5e9;
border-left: 4px solid #2e7d32; } border-left: 4px solid #2e7d32; }
.card.large {
max-width: 480px; }
.card.small {
max-width: 160px; }
.card.fluid {
max-width: 100%; }
.card.primary {
background: #e1f5fe;
color: #263238;
border: 1px solid #01579b; }
.card > .section.dark {
background: #bdbdbd; }
.card > .section.primary {
background: #0277bd; }
.card > .section.double-padded {
padding: 12px 16px 12px; }
.row.cards {
-webkit-box-pack: justify;
-webkit-justify-content: space-around;
justify-content: space-around; }
.spinner-donut.secondary {
border: 4px solid #ffebee;
border-left: 4px solid #c62828; }
.row.cards {
-webkit-box-pack: justify;
-webkit-justify-content: space-around;
justify-content: space-around; }
.bordered { .bordered {
border: 1px solid rgba(0, 0, 0, 0.25) !important; } border: 1px solid rgba(0, 0, 0, 0.25) !important; }

File diff suppressed because one or more lines are too long

View File

@@ -392,3 +392,4 @@
- Removed `spinner` file. - Removed `spinner` file.
- Cleanup for `navigation`. - Cleanup for `navigation`.
- Cleanup for `utility`. - Cleanup for `utility`.
- Cleanup for `card`. Changed loading order and variables to better reflect the new module system.

View File

@@ -124,23 +124,35 @@ $grid-large-prefix: 'lg'; // Large screen class prefix for grid
// Notes: // Notes:
// [1] - If the value of $use-four-step-grid is `true`, the grid system will contain 4 breakpoints instead of 3, along with // [1] - If the value of $use-four-step-grid is `true`, the grid system will contain 4 breakpoints instead of 3, along with
// the needed styles. In this case, values should be specified for $grid-extra-small-prefix and $grid-small-breakpoint. // the needed styles. In this case, values should be specified for $grid-extra-small-prefix and $grid-small-breakpoint.
// Variables for responsive tables // Variables for navigational elements
$table-border-style: 1px solid #bdbdbd; // Border style for <table> and children $header-height: 36px; // Height for header
$table-border-radius: 2px; // Border radius for <table> and children $header-back-color: #263238; // Background color for header
$table-margin: 0 auto; // Margin for <table> $header-fore-color: $back-color; // Text color for header
$table-caption-font-size: 1.5em; // Font size for <caption> $header-margin: 0; // Margin for header
$table-caption-margin: 6px 0 12px; // Margin for <caption> $header-padding: 2px 8px; // Padding for header
$table-row-padding: 6px; // Padding for <tr> - both views $header-logo-name: 'logo'; // Class name for header's logo
$table-column-padding: 10px; // Padding for <td> and <th> - desktop view $header-logo-font-size: 1.75em; // Font size for header's logo
$table-head-back-color: #eceff1; // Background color for <th> $header-logo-line-height: 1.2; // Line height for header's logo
$table-mobile-breakpoint: 768px; // Breakpoint for <table> mobile view $header-logo-margin: 1px 6px 1px 1px; // Margin for header's logo
$table-mobile-card-spacing: 10px; // Space between <tr> cards - mobile view $header-logo-padding: 0; // Padding for header's logo
$table-mobile-card-label: 'data-label'; // Attribute used to replace column headers $header-link-hover-color: #37474f; // Hover color for header's links
// in mobile view [1] $header-link-margin: 2px 0 0; // Margin for header's links
$table-mobile-label-font-weight:$bold-font-weight; // Font weight for mobile headers $nav-back-color: #eceff1; // Background for nav
// Notes: $nav-fore-color: $fore-color; // Text color for nav
// [1] - The attribute specified in $table-mobile-card-label must be added manually to each and every element in the table $nav-border-style: 0; // Border style for nav
// in order for their mobile headers to display properly. $nav-border-radius: 1px; // Border radius for nav
$nav-padding: 4px 4px 4px 16px; // Padding for nav
$nav-margin: 2px; // Margin for nav
$nav-link-fore-color: $link-fore-color; // Text color for links in nav
$nav-sublink-prefix: 'sublink'; // Prefix for the subcategory links in nav
$nav-sublink-depth: 2; // Amount of subcategory classes to add
$nav-sublink-padding-left: 12px; // Left padding to add to subcategories
$footer-back-color: #263238; // Background color for footer
$footer-fore-color: $back-color; // Text color for footer
$footer-font-size: 85%; // Font size for footer
$footer-margin: 18px 0 0; // Margin for footer
$footer-padding: 22px 10px 12px; // Padding for footer
$footer-link-fore-color: #039be5; // Text color for links in footer
// Variables for forms and inputs // Variables for forms and inputs
$form-back-color: #eceff1; // Background color for forms $form-back-color: #eceff1; // Background color for forms
$form-fore-color: $fore-color; // Text color for forms $form-fore-color: $fore-color; // Text color for forms
@@ -234,35 +246,73 @@ $checkbox-disabled-opacity: $input-disabled-opacity; // Opacity for disabl
// allow for universal button styles, even for file input buttons, but can be disabled if the base style is desired. // allow for universal button styles, even for file input buttons, but can be disabled if the base style is desired.
// If the value is `false`, some fixes will be applied to the <input type="file"> element. // If the value is `false`, some fixes will be applied to the <input type="file"> element.
// [2] - The value of $checkbox-size will determine a few variables like some `margin` values, `height`, `width` etc. // [2] - The value of $checkbox-size will determine a few variables like some `margin` values, `height`, `width` etc.
// Variables for navigational elements // Variables for responsive tables
$header-height: 36px; // Height for header $table-border-style: 1px solid #bdbdbd; // Border style for <table> and children
$header-back-color: #263238; // Background color for header $table-border-radius: 2px; // Border radius for <table> and children
$header-fore-color: $back-color; // Text color for header $table-margin: 0 auto; // Margin for <table>
$header-margin: 0; // Margin for header $table-caption-font-size: 1.5em; // Font size for <caption>
$header-padding: 2px 8px; // Padding for header $table-caption-margin: 6px 0 12px; // Margin for <caption>
$header-logo-name: 'logo'; // Class name for header's logo $table-row-padding: 6px; // Padding for <tr> - both views
$header-logo-font-size: 1.75em; // Font size for header's logo $table-column-padding: 10px; // Padding for <td> and <th> - desktop view
$header-logo-line-height: 1.2; // Line height for header's logo $table-head-back-color: #eceff1; // Background color for <th>
$header-logo-margin: 1px 6px 1px 1px; // Margin for header's logo $table-mobile-breakpoint: 768px; // Breakpoint for <table> mobile view
$header-logo-padding: 0; // Padding for header's logo $table-mobile-card-spacing: 10px; // Space between <tr> cards - mobile view
$header-link-hover-color: #37474f; // Hover color for header's links $table-mobile-card-label: 'data-label'; // Attribute used to replace column headers
$header-link-margin: 2px 0 0; // Margin for header's links // in mobile view [1]
$nav-back-color: #eceff1; // Background for nav $table-mobile-label-font-weight:$bold-font-weight; // Font weight for mobile headers
$nav-fore-color: $fore-color; // Text color for nav // Notes:
$nav-border-style: 0; // Border style for nav // [1] - The attribute specified in $table-mobile-card-label must be added manually to each and every element in the table
$nav-border-radius: 1px; // Border radius for nav // in order for their mobile headers to display properly.
$nav-padding: 4px 4px 4px 16px; // Padding for nav // Variables for cards [1]
$nav-margin: 2px; // Margin for nav $card-name: 'card'; // Class name for cards
$nav-link-fore-color: $link-fore-color; // Text color for links in nav $card-back-color: #f5f5f5; // Background color for cards
$nav-sublink-prefix: 'sublink'; // Prefix for the subcategory links in nav $card-fore-color: $fore-color; // Text color for cards
$nav-sublink-depth: 2; // Amount of subcategory classes to add $card-border-style: 1px solid #9e9e9e; // Border style for cards
$nav-sublink-padding-left: 12px; // Left padding to add to subcategories $card-border-radius: 2px; // Border radius for cards
$footer-back-color: #263238; // Background color for footer $card-margin: 2px 10px 20px; // Margin for cards
$footer-fore-color: $back-color; // Text color for footer $card-section-name: 'section'; // Class name for card sections
$footer-font-size: 85%; // Font size for footer $card-section-border-style: 1px solid #bdbdbd; // Border style for card sections
$footer-margin: 18px 0 0; // Margin for footer $card-section-padding: 6px 8px 6px; // Padding for card sections
$footer-padding: 22px 10px 12px; // Padding for footer $card-section-media-name: 'media'; // Class name for card media sections
$footer-link-fore-color: #039be5; // Text color for links in footer $card-section-media-height: 200px; // Height for card media setions
$card-normal-width: 320px; // Width for normal cards
$card-size1-name: 'large'; // Class name for large cards
$card-size1-width: 480px; // Width for large cards
$card-size2-name: 'small'; // Class name for small cards
$card-size2-width: 160px; // Width for small cards
$card-size3-name: 'fluid'; // Class name for fluid cards
$card-size3-width: 100%; // Width for fluid cards
$card-style1-name: 'primary'; // Class name for card style 1
$card-style1-back-color: #e1f5fe; // Background color for card style 1
$card-style1-fore-color: #263238; // Text color for card style 1
$card-style1-border-style: 1px solid #01579b; // Border style for card style 1
$card-section-style1-name: 'dark'; // Class name for card section style 1
$card-section-style1-back-color:#bdbdbd; // Background color for card section style 1
$card-section-style1-fore-color:$fore-color; // Text color for card section style 1
$card-section-style2-name: 'primary'; // Class name for card section style 2
$card-section-style2-back-color:#0277bd; // Background color for card section style 2
$card-section-style2-fore-color:$fore-color; // Text color for card section style 2
$card-section-padding1-name: 'double-padded'; // Class name for card section padding style 1
$card-section-padding1-padding: 12px 16px 12px; // Padding for card section padding style 1
// Notes:
// [1] - The cards module depends heavily on the grid system module.
// Variables for tabs [1]
$tab-container-name: 'tabs'; // Class name for the tabs' container
$tab-label-back-color: #b0bec5; // Background color for tabs' labels
$tab-label-fore-color: $fore-color; // Text color for tabs' labels
$tab-label-selected-back-color: #cfd8dc; // Background color for open tab's label
$tab-label-selected-fore-color: $fore-color; // Text color for open tab's label
$tab-label-hover-opacity: 0.75; // Opacity of the tab's label on hover
$tab-label-padding: 4px 6px; // Padding for tabs' labels
$tab-label-height: 26px; // Height for tabs' labels
$tab-border-style: 1px solid #78909c; // Border style for tabs
$tab-border-radius: 2px; // Border radius for tabs
$tab-panel-back-color: $back-color; // Background color for tabs' panels
$tab-panel-fore-color: $fore-color; // Text color for tabs' panels
$tab-panel-padding: 6px; // Padding for tabs' panels
$tab-panel-height: 400px; // Height for tabs' panels
$tab-stacked-breakpoint: $grid-medium-breakpoint; // Breakpoint for tabs layout (stacked/horizontal)
$tab-stacked-name: 'stacked'; // Class name for stacked tabs
// Variables for contextual background elements // Variables for contextual background elements
$mark-back-color: #0277bd; // Background color for <mark> $mark-back-color: #0277bd; // Background color for <mark>
$mark-fore-color: $back-color; // Text color for <mark> $mark-fore-color: $back-color; // Text color for <mark>
@@ -320,56 +370,6 @@ $spinner-donut-variant2-back-color: // Background color for donut spi
#e8f5e9; #e8f5e9;
$spinner-donut-variant2-fore-color: // Foreground color for donut spinner variant 2 $spinner-donut-variant2-fore-color: // Foreground color for donut spinner variant 2
#2e7d32; #2e7d32;
// Variables for cards [1]
$card-name: 'card'; // Class name for cards
$card-back-color: #f5f5f5; // Background color for cards
$card-fore-color: $fore-color; // Text color for cards
$card-border-style: 1px solid #9e9e9e; // Border style for cards
$card-border-radius: 2px; // Border radius for cards
$card-margin: 2px 10px 20px; // Margin for cards
$card-section-name: 'section'; // Class name for card sections
$card-section-border-style: 1px solid #bdbdbd; // Border style for card sections
$card-section-padding: 6px 8px 6px; // Padding for card sections
$card-section-media-name: 'media'; // Class name for card media sections
$card-section-media-height: 200px; // Height for card media setions
$card-normal-width: 320px; // Width for normal cards
$card-size1-name: 'large'; // Class name for large cards
$card-size1-width: 480px; // Width for large cards
$card-size2-name: 'small'; // Class name for small cards
$card-size2-width: 160px; // Width for small cards
$card-size3-name: 'fluid'; // Class name for fluid cards
$card-size3-width: 100%; // Width for fluid cards
$card-style1-name: 'primary'; // Class name for card style 1
$card-style1-back-color: #e1f5fe; // Background color for card style 1
$card-style1-fore-color: #263238; // Text color for card style 1
$card-style1-border-style: 1px solid #01579b; // Border style for card style 1
$card-section-style1-name: 'dark'; // Class name for card section style 1
$card-section-style1-back-color:#bdbdbd; // Background color for card section style 1
$card-section-style1-fore-color:$fore-color; // Text color for card section style 1
$card-section-style2-name: 'primary'; // Class name for card section style 2
$card-section-style2-back-color:#0277bd; // Background color for card section style 2
$card-section-style2-fore-color:$fore-color; // Text color for card section style 2
$card-section-padding1-name: 'double-padded'; // Class name for card section padding style 1
$card-section-padding1-padding: 12px 16px 12px; // Padding for card section padding style 1
// Notes:
// [1] - The cards module depends heavily on the grid system module.
// Variables for tabs [1]
$tab-container-name: 'tabs'; // Class name for the tabs' container
$tab-label-back-color: #b0bec5; // Background color for tabs' labels
$tab-label-fore-color: $fore-color; // Text color for tabs' labels
$tab-label-selected-back-color: #cfd8dc; // Background color for open tab's label
$tab-label-selected-fore-color: $fore-color; // Text color for open tab's label
$tab-label-hover-opacity: 0.75; // Opacity of the tab's label on hover
$tab-label-padding: 4px 6px; // Padding for tabs' labels
$tab-label-height: 26px; // Height for tabs' labels
$tab-border-style: 1px solid #78909c; // Border style for tabs
$tab-border-radius: 2px; // Border radius for tabs
$tab-panel-back-color: $back-color; // Background color for tabs' panels
$tab-panel-fore-color: $fore-color; // Text color for tabs' panels
$tab-panel-padding: 6px; // Padding for tabs' panels
$tab-panel-height: 400px; // Height for tabs' panels
$tab-stacked-breakpoint: $grid-medium-breakpoint; // Breakpoint for tabs layout (stacked/horizontal)
$tab-stacked-name: 'stacked'; // Class name for stacked tabs
// Variables for utilities and helper classes // Variables for utilities and helper classes
$border-generic-name: 'bordered'; // Class name for generic border style $border-generic-name: 'bordered'; // Class name for generic border style
$border-radial-style1-name: 'rounded'; // Class name for radial border style 1 $border-radial-style1-name: 'rounded'; // Class name for radial border style 1
@@ -386,7 +386,7 @@ $breadcrumbs-name: 'breadcrumbs'; // Class name for breadcrumbs
// [1] - The tabs module is somewhat dependent on the grid system module. // [1] - The tabs module is somewhat dependent on the grid system module.
// Enable mini.css // Enable mini.css
@import '../mini/core'; @import '../mini/core';
// Use mixins for button elements // Use mixins for forms and inputs
@include make-button-alt-color ($button-variant1-name, $button-variant1-back-color, @include make-button-alt-color ($button-variant1-name, $button-variant1-back-color,
$button-variant1-back-opacity, $button-variant1-hover-back-opacity, $button-variant1-fore-color); $button-variant1-back-opacity, $button-variant1-hover-back-opacity, $button-variant1-fore-color);
@include make-button-alt-color ($button-variant2-name, $button-variant2-back-color, @include make-button-alt-color ($button-variant2-name, $button-variant2-back-color,
@@ -402,19 +402,6 @@ $breadcrumbs-name: 'breadcrumbs'; // Class name for breadcrumbs
// $button-custom-back-opacity, $button-custom-hover-back-opacity); // $button-custom-back-opacity, $button-custom-hover-back-opacity);
//@include make-button-alt-style ($button-custom-name, $button-custom-border-style, //@include make-button-alt-style ($button-custom-name, $button-custom-border-style,
// $button-custom-border-radius, $button-custom-padding, $button-custom-margin); // $button-custom-border-radius, $button-custom-padding, $button-custom-margin);
// Use mixins for contextual background elements
@include make-mark-alt-color ($mark-variant1-name, $mark-variant1-back-color);
@include make-mark-alt-color ($mark-variant2-name, $mark-variant2-back-color);
@include make-mark-alt-style ($mark-style1-name, $mark-style1-border-radius, $mark-style1-padding);
@include make-mark-alt-style ($mark-style2-name, $mark-style2-border-radius, $mark-style2-padding);
// Use mixins for progress elements
@include make-progress-inline ($progress-inline-name, $progress-inline-width);
@include make-progress-alt-color ($progress-variant1-name, $progress-variant1-fore-color);
@include make-progress-alt-color ($progress-variant2-name, $progress-variant2-fore-color);
@include make-progress-alt-style ($progress-style1-name, $progress-style1-height,
$progress-style1-margin, $progress-style1-border-style, $progress-style1-border-radius);
@include make-spinner-donut-alt-color ($spinner-donut-variant2-name, $spinner-donut-variant2-back-color,
$spinner-donut-variant2-fore-color);
// Use mixins for cards // Use mixins for cards
@include make-card-alt-size ($card-size1-name, $card-size1-width); @include make-card-alt-size ($card-size1-name, $card-size1-width);
@include make-card-alt-size ($card-size2-name, $card-size2-width); @include make-card-alt-size ($card-size2-name, $card-size2-width);
@@ -430,6 +417,19 @@ $breadcrumbs-name: 'breadcrumbs'; // Class name for breadcrumbs
@include make-spinner-donut-alt-color ($spinner-donut-variant1-name, $spinner-donut-variant1-back-color, @include make-spinner-donut-alt-color ($spinner-donut-variant1-name, $spinner-donut-variant1-back-color,
$spinner-donut-variant1-fore-color); $spinner-donut-variant1-fore-color);
@include add-grid-row-cards-alignment; @include add-grid-row-cards-alignment;
// Use mixins for contextual background elements and alerts
@include make-mark-alt-color ($mark-variant1-name, $mark-variant1-back-color);
@include make-mark-alt-color ($mark-variant2-name, $mark-variant2-back-color);
@include make-mark-alt-style ($mark-style1-name, $mark-style1-border-radius, $mark-style1-padding);
@include make-mark-alt-style ($mark-style2-name, $mark-style2-border-radius, $mark-style2-padding);
// Use mixins for progress elements and spinners
@include make-progress-inline ($progress-inline-name, $progress-inline-width);
@include make-progress-alt-color ($progress-variant1-name, $progress-variant1-fore-color);
@include make-progress-alt-color ($progress-variant2-name, $progress-variant2-fore-color);
@include make-progress-alt-style ($progress-style1-name, $progress-style1-height,
$progress-style1-margin, $progress-style1-border-style, $progress-style1-border-radius);
@include make-spinner-donut-alt-color ($spinner-donut-variant2-name, $spinner-donut-variant2-back-color,
$spinner-donut-variant2-fore-color);
// Use mixins for utilities and helper classes // Use mixins for utilities and helper classes
@include make-border-generic ($border-generic-name); @include make-border-generic ($border-generic-name);
@include make-border-radial-style ($border-radial-style1-name, $border-radial-style1-radius); @include make-border-radial-style ($border-radial-style1-name, $border-radial-style1-radius);

View File

@@ -6,69 +6,68 @@ $card-section-name: 'section' !default; // Class name for the cards' s
$card-section-media-name: 'media' !default; // Class name for the cards' sections (media cotent) $card-section-media-name: 'media' !default; // Class name for the cards' sections (media cotent)
$card-normal-width: 320px !default; // Width for normal cards $card-normal-width: 320px !default; // Width for normal cards
.#{$card-name} { .#{$card-name} {
// Make cards display properly using flexbox tricks // Old syntax
// Old syntax
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-box-pack: justify; -webkit-box-pack: justify;
-webkit-box-align: center; -webkit-box-align: center;
// New syntax // New syntax
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
-webkit-flex-direction: column; -webkit-flex-direction: column;
flex-direction: column; flex-direction: column;
-webkit-justify-content: space-between; -webkit-justify-content: space-between;
justify-content: space-between; justify-content: space-between;
-webkit-align-self: center; -webkit-align-self: center;
align-self: center; align-self: center;
position: relative; position: relative;
width: 100%; width: 100%;
// Actual styling for the cards // Actual styling for the cards
@if $card-back-color != $back-color { @if $card-back-color != $back-color {
background: $card-back-color; background: $card-back-color;
} }
@if $card-fore-color != $fore-color { @if $card-fore-color != $fore-color {
color: $card-fore-color; color: $card-fore-color;
} }
@if $card-border-style != 0 { @if $card-border-style != 0 {
border: $card-border-style; border: $card-border-style;
} }
@if $card-border-radius != 0 { @if $card-border-radius != 0 {
border-radius: $card-border-radius; border-radius: $card-border-radius;
} }
@if $card-margin != 0 { @if $card-margin != 0 {
margin: $card-margin; margin: $card-margin;
} }
// Tasteful shadow // Tasteful shadow
box-shadow: rgba(0, 0, 0, 0.25) 0 0 3px 0; box-shadow: rgba(0, 0, 0, 0.25) 0 0 3px 0;
// Card sections // Card sections
& > .#{$card-section-name} { & > .#{$card-section-name} {
box-sizing: border-box; box-sizing: border-box;
margin: 0; margin: 0;
border-bottom: $card-section-border-style; border-bottom: $card-section-border-style;
padding: $card-section-padding; padding: $card-section-padding;
width: 100%; width: 100%;
// Card media sections // Card media sections
&.#{$card-section-media-name} { &.#{$card-section-media-name} {
height: $card-section-media-height; height: $card-section-media-height;
padding: 0; padding: 0;
-o-object-fit: cover; -o-object-fit: cover;
object-fit: cover; object-fit: cover;
} }
} }
// Card input and button sections // Card input and button sections
& > button, .#{$button-class-name}, input { & > button, .#{$button-class-name}, input {
&.#{$card-section-name} { &.#{$card-section-name} {
border-radius: 0; // Clean button and input gaps from border-radius border-radius: 0; // Clean button and input gaps from border-radius
} }
} }
// Card sections - last // Card sections - last
& > .#{$card-section-name}:last-child { & > .#{$card-section-name}:last-child {
border-bottom: 0; // Clean the extra border for last section border-bottom: 0; // Clean the extra border for last section
} }
} }
// Responsiveness (if the screen is larger than card, set max-width) // Responsiveness (if the screen is larger than card, set max-width)
@media only screen and (min-width: #{$card-normal-width}) { @media (min-width: #{$card-normal-width}) {
.#{$card-name} { .#{$card-name} {
max-width: $card-normal-width; max-width: $card-normal-width;
} }
@@ -78,18 +77,18 @@ $card-normal-width: 320px !default; // Width for normal cards
// - $card-alt-size-name : The name of the class used for the alternate size card. // - $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. // - $card-alt-size-width : The width of the alternate size card.
@mixin make-card-alt-size ($card-alt-size-name, $card-alt-size-width) { @mixin make-card-alt-size ($card-alt-size-name, $card-alt-size-width) {
@if type-of($card-alt-size-width) == 'number' && unit($card-alt-size-width) == '%' { @if type-of($card-alt-size-width) == 'number' && unit($card-alt-size-width) == '%' {
.#{$card-name}.#{$card-alt-size-name} { .#{$card-name}.#{$card-alt-size-name} {
max-width: $card-alt-size-width; max-width: $card-alt-size-width;
} }
} }
@else { @else {
@media only screen and (min-width: #{$card-alt-size-width}) { @media (min-width: #{$card-alt-size-width}) {
.#{$card-name}.#{$card-alt-size-name} { .#{$card-name}.#{$card-alt-size-name} {
max-width: $card-alt-size-width; max-width: $card-alt-size-width;
}
}
} }
}
}
} }
// Mixin for alternate cards (card color variants). // Mixin for alternate cards (card color variants).
// Variables: // Variables:
@@ -102,20 +101,20 @@ $card-normal-width: 320px !default; // Width for normal cards
// of $card-border-radius. // of $card-border-radius.
@mixin make-card-alt-color ($card-alt-name, $card-alt-back-color, $card-alt-fore-color, @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-border-style : $card-border-style, $card-alt-border-radius : $card-border-radius) {
.#{$card-name}.#{$card-alt-name} { .#{$card-name}.#{$card-alt-name} {
@if $card-alt-back-color != $card-back-color { @if $card-alt-back-color != $card-back-color {
background: $card-alt-back-color; background: $card-alt-back-color;
} }
@if $card-alt-fore-color != $card-fore-color { @if $card-alt-fore-color != $card-fore-color {
color: $card-alt-fore-color; color: $card-alt-fore-color;
} }
@if $card-alt-border-style != $card-border-style { @if $card-alt-border-style != $card-border-style {
border: $card-alt-border-style; border: $card-alt-border-style;
} }
@if $card-alt-border-radius != $card-border-radius { @if $card-alt-border-radius != $card-border-radius {
border-radius: $card-alt-border-radius; border-radius: $card-alt-border-radius;
} }
} }
} }
// Mixin for alternate card sections (card section color variants). // Mixin for alternate card sections (card section color variants).
// Variables: // Variables:
@@ -126,35 +125,35 @@ $card-normal-width: 320px !default; // Width for normal cards
// the value of $card-section-border-style. // the value of $card-section-border-style.
@mixin make-card-section-alt-color ($card-section-alt-name, $card-section-alt-back-color, @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-section-alt-fore-color, $card-section-alt-border-style : $card-section-border-style) {
.#{$card-name} > .#{$card-section-name}.#{$card-section-alt-name} { .#{$card-name} > .#{$card-section-name}.#{$card-section-alt-name} {
@if $card-section-alt-back-color != $card-back-color { @if $card-section-alt-back-color != $card-back-color {
background: $card-section-alt-back-color; background: $card-section-alt-back-color;
} }
@if $card-section-alt-fore-color != $card-fore-color { @if $card-section-alt-fore-color != $card-fore-color {
color: $card-section-alt-fore-color; color: $card-section-alt-fore-color;
} }
@if $card-section-alt-border-style != $card-section-border-style { @if $card-section-alt-border-style != $card-section-border-style {
border: $card-section-alt-border-style; border: $card-section-alt-border-style;
} }
} }
} }
// Mixin for alternate card sections (card section padding variants). // Mixin for alternate card sections (card section padding variants).
// Variables: // Variables:
// - $card-section-alt-name : The name of the class used for the alternate card section. // - $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. // - $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) { @mixin make-card-section-alt-style ($card-section-alt-name, $card-section-alt-padding) {
.#{$card-name} > .#{$card-section-name}.#{$card-section-alt-name} { .#{$card-name} > .#{$card-section-name}.#{$card-section-alt-name} {
padding: $card-section-alt-padding; padding: $card-section-alt-padding;
} }
} }
// Mixin for grid system's row that spaces cards apart. // Mixin for grid system's row that spaces cards apart.
@mixin add-grid-row-cards-alignment { @mixin add-grid-row-cards-alignment {
$grid-row-name: 'row' !default; // Class name for the cards $grid-row-name: 'row' !default; // Class name for the cards
.#{$grid-row-name}.#{$card-name}s { .#{$grid-row-name}.#{$card-name}s {
// Old syntax // Old syntax
-webkit-box-pack: justify; -webkit-box-pack: justify;
// New syntax // New syntax
-webkit-justify-content: space-around; -webkit-justify-content: space-around;
justify-content: space-around; justify-content: space-around;
} }
} }

View File

@@ -349,11 +349,11 @@ a{
} }
// External file loading. You can comment out modules you do not want to use. // External file loading. You can comment out modules you do not want to use.
@import 'grid'; @import 'grid';
@import 'table';
@import 'input_control';
@import 'navigation'; @import 'navigation';
@import 'contextual'; @import 'input_control';
@import 'progress'; @import 'table';
@import 'card'; @import 'card';
@import 'tab'; @import 'tab';
@import 'contextual';
@import 'progress';
@import 'utility'; @import 'utility';