mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-26 19:44:07 +03:00
added generated file header, fixed contrast functions
This commit is contained in:
parent
6958131c31
commit
427b5046fe
10
Gruntfile.js
10
Gruntfile.js
|
@ -95,7 +95,15 @@ module.exports = function (grunt) {
|
|||
pattern: /.generic-variations\(unquote\(("([^"]+)?")\), (\$[\s\S]+?(?!\r|\n)), {$\n[\s\S]+}\);$\n/mg,
|
||||
replacement: '@include alert-variations(unquote($1), $3);\n',
|
||||
order: 250 // very broad search, do this last
|
||||
}
|
||||
},
|
||||
|
||||
// auto generated notice
|
||||
{ // Multi-line replacement - https://regex101.com/r/aR2kT5/1
|
||||
pattern: /([\s\S]+)/mg,
|
||||
replacement: '\/\/ This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten. \n\n$1',
|
||||
order: 1000 // very broad search, do this last
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
2271
dist/css/material.css
vendored
2271
dist/css/material.css
vendored
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.alert {
|
||||
border: 0px;
|
||||
border-radius: 0;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
@mixin btn-shadow(){
|
||||
@include shadow-z-1();
|
||||
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.card {
|
||||
|
||||
/***** Make height equal to width (http://stackoverflow.com/a/6615994) ****/
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.form-horizontal .checkbox {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
/*
|
||||
|
||||
To get this list of colors inject jQuery at http://www.google.com/design/spec/style/color.html#color-color-palette
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
//
|
||||
// Modals
|
||||
// Material Design element Dialogs
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
hr {
|
||||
&.on-dark {
|
||||
color: lighten($black, 10%);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
@font-face {
|
||||
font-family: 'Material-Design-Icons';
|
||||
src:url('#{$material-font-path}/Material-Design-Icons.eot?3ocs8m');
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.mdi, icon {
|
||||
@include variations(unquote(""), color, $lightbg-text);
|
||||
line-height: inherit;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
fieldset[disabled] .form-control, .form-control {
|
||||
&, &:focus, &.focus {
|
||||
padding: 0;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.label {
|
||||
border-radius: 1px;
|
||||
@include variations(unquote(""), background-color, $grey);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.list-group {
|
||||
border-radius: 0;
|
||||
.list-group-item {
|
||||
|
|
|
@ -1,5 +1,34 @@
|
|||
// This file is NOT automatically converted and must be manually merged
|
||||
|
||||
// contrast-color and brightness borrowed from compass
|
||||
// Copyright (c) 2009-2014 Christopher M. Eppstein
|
||||
// Complies with license: https://github.com/Compass/compass/blob/stable/LICENSE.markdown
|
||||
@function contrast-color($color, $dark: $contrasted-dark-default, $light: $contrasted-light-default, $threshold: null) {
|
||||
@if $threshold {
|
||||
// Deprecated in Compass 0.13
|
||||
@warn "The $threshold argment to contrast-color is no longer needed and will be removed in the next release.";
|
||||
}
|
||||
@if $color == null {
|
||||
@return null;
|
||||
}
|
||||
@else {
|
||||
$color-brightness: brightness($color);
|
||||
$dark-text-brightness: brightness($dark);
|
||||
$light-text-brightness: brightness($light);
|
||||
@return if(abs($color-brightness - $light-text-brightness) > abs($color-brightness - $dark-text-brightness), $light, $dark);
|
||||
}
|
||||
}
|
||||
|
||||
@function brightness($color) {
|
||||
@if type-of($color) == color {
|
||||
@return (red($color) * 0.299 + green($color) * 0.587 + blue($color) * 0.114) / 255 * 100%;
|
||||
}
|
||||
@else {
|
||||
@return unquote("brightness(#{$color})");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// variations(unquote(""), background-color, #FFF);
|
||||
@mixin variations($extra, $material-param-1, $default) {
|
||||
@include generic-variations($extra, $default, "variations-content", $material-param-1);
|
||||
|
@ -41,11 +70,9 @@
|
|||
//@debug "#{inspect($args)}";
|
||||
$material-color: map-get($args, material-color);
|
||||
$material-param-1: map-get($args, material-param-1);
|
||||
$contrast-factor: map-get($args, contrast-factor);
|
||||
background-color: contrast($material-color,
|
||||
background-color: contrast-color($material-color,
|
||||
darken($material-color, $material-param-1),
|
||||
lighten($material-color, $material-param-1),
|
||||
$contrast-factor);
|
||||
lighten($material-color, $material-param-1));
|
||||
}
|
||||
|
||||
@mixin bg-color-variations($extra, $default, $material-param-1) {
|
||||
|
@ -168,14 +195,12 @@
|
|||
|
||||
@mixin generic-variations($extra, $default, $mixin-name, $material-param-1) {
|
||||
|
||||
$contrast-factor: 40%;
|
||||
//setup map to pass parameters (instead of the incredibly long-error-prone list for each and every @include)
|
||||
$args: (
|
||||
extra: $extra,
|
||||
default: $default,
|
||||
mixin-name: $mixin-name,
|
||||
material-param-1: $material-param-1,
|
||||
contrast-factor: $contrast-factor,
|
||||
material-param-1: $material-param-1
|
||||
);
|
||||
|
||||
// bootstrap styles
|
||||
|
@ -212,7 +237,7 @@
|
|||
material-color-name: "inverse",
|
||||
material-color-full-name: "inverse",
|
||||
material-color: $inverse,
|
||||
material-text-color: contrast($inverse, $lightbg-text, $darkbg-text, $contrast-factor)
|
||||
material-text-color: contrast-color($inverse, $lightbg-text, $darkbg-text)
|
||||
));
|
||||
@include call-variations-content-mixin($args-inverse);
|
||||
}
|
||||
|
@ -270,9 +295,9 @@
|
|||
$material-color-number: map-get($args, material-color-number);
|
||||
$material-color-full-name: "#{$material-color-name}#{$material-color-number}";
|
||||
$material-color: map-get($args, material-color); // $material-color-full-name;
|
||||
$material-text-color: contrast($material-color, $lightbg-text, $darkbg-text, map-get($args, contrast-factor));
|
||||
$material-text-color: contrast-color($material-color, $lightbg-text, $darkbg-text);
|
||||
|
||||
& -material-#{$material-color-name}#{unquote($material-color-number)}#{map-get($args, extra)} {
|
||||
&-material-#{$material-color-name}#{unquote($material-color-number)}#{map-get($args, extra)} {
|
||||
$args-color: map-merge($args, (
|
||||
material-color-full-name: $material-color-full-name,
|
||||
material-color: $material-color,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.navbar {
|
||||
background-color: $primary;
|
||||
border: $zero;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.panel {
|
||||
border-radius: 2px;
|
||||
border: 0;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.dropdownjs:after {
|
||||
right: 5px;
|
||||
top: 3px;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.noUi-target,
|
||||
.noUi-target * {
|
||||
-webkit-touch-callout: none;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
// Support for Selectize plugin
|
||||
// http://brianreavis.github.io/selectize.js/
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
// Support for SnackbarJS plugin
|
||||
// https://github.com/FezVrasta/snackbarjs
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.popover, .tooltip-inner {
|
||||
color: $popover-color;
|
||||
line-height: 1em;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.progress {
|
||||
height: 4px;
|
||||
border-radius: 0;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.form-horizontal .radio {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
@mixin shadow-z-1 {
|
||||
box-shadow:
|
||||
0 1px 6px 0 rgba(0, 0, 0, 0.12),
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.nav-tabs {
|
||||
background: $primary;
|
||||
> li {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.togglebutton {
|
||||
vertical-align: middle;
|
||||
&, label, input, .toggle {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
// Material Global vars
|
||||
$zero: 0 !default;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
body, .container, .container-fluid {
|
||||
|
||||
.well.well-sm {
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
@import 'material';
|
||||
@import '_mixins-fullpalette';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
@import '_colors';
|
||||
@import '_variables';
|
||||
@import '_mixins';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
.withripple {
|
||||
position: relative;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
|
||||
|
||||
@import '_variables';
|
||||
@import '_colors';
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user