added generated file header, fixed contrast functions

This commit is contained in:
Kevin Ross 2015-11-04 16:54:57 -06:00
parent b21fad8b87
commit 45926cd3a9
33 changed files with 5515 additions and 3151 deletions

View File

@ -95,7 +95,15 @@ module.exports = function (grunt) {
pattern: /.generic-variations\(unquote\(("([^"]+)?")\), (\$[\s\S]+?(?!\r|\n)), {$\n[\s\S]+}\);$\n/mg, pattern: /.generic-variations\(unquote\(("([^"]+)?")\), (\$[\s\S]+?(?!\r|\n)), {$\n[\s\S]+}\);$\n/mg,
replacement: '@include alert-variations(unquote($1), $3);\n', replacement: '@include alert-variations(unquote($1), $3);\n',
order: 250 // very broad search, do this last 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

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.alert { .alert {
border: 0px; border: 0px;
border-radius: 0; border-radius: 0;

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
@mixin btn-shadow(){ @mixin btn-shadow(){
@include shadow-z-1(); @include shadow-z-1();
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.card { .card {
/***** Make height equal to width (http://stackoverflow.com/a/6615994) ****/ /***** Make height equal to width (http://stackoverflow.com/a/6615994) ****/

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.form-horizontal .checkbox { .form-horizontal .checkbox {
padding-top: 20px; padding-top: 20px;
} }

View File

@ -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 To get this list of colors inject jQuery at http://www.google.com/design/spec/style/color.html#color-color-palette

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
// //
// Modals // Modals
// Material Design element Dialogs // Material Design element Dialogs

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
hr { hr {
&.on-dark { &.on-dark {
color: lighten($black, 10%); color: lighten($black, 10%);

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
@font-face { @font-face {
font-family: 'Material-Design-Icons'; font-family: 'Material-Design-Icons';
src:url('#{$material-font-path}/Material-Design-Icons.eot?3ocs8m'); src:url('#{$material-font-path}/Material-Design-Icons.eot?3ocs8m');

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.mdi, icon { .mdi, icon {
@include variations(unquote(""), color, $lightbg-text); @include variations(unquote(""), color, $lightbg-text);
line-height: inherit; line-height: inherit;

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
fieldset[disabled] .form-control, .form-control { fieldset[disabled] .form-control, .form-control {
&, &:focus, &.focus { &, &:focus, &.focus {
padding: 0; padding: 0;

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.label { .label {
border-radius: 1px; border-radius: 1px;
@include variations(unquote(""), background-color, $grey); @include variations(unquote(""), background-color, $grey);

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.list-group { .list-group {
border-radius: 0; border-radius: 0;
.list-group-item { .list-group-item {

View File

@ -1,5 +1,34 @@
// This file is NOT automatically converted and must be manually merged // 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); // variations(unquote(""), background-color, #FFF);
@mixin variations($extra, $material-param-1, $default) { @mixin variations($extra, $material-param-1, $default) {
@include generic-variations($extra, $default, "variations-content", $material-param-1); @include generic-variations($extra, $default, "variations-content", $material-param-1);
@ -41,11 +70,9 @@
//@debug "#{inspect($args)}"; //@debug "#{inspect($args)}";
$material-color: map-get($args, material-color); $material-color: map-get($args, material-color);
$material-param-1: map-get($args, material-param-1); $material-param-1: map-get($args, material-param-1);
$contrast-factor: map-get($args, contrast-factor); background-color: contrast-color($material-color,
background-color: contrast($material-color,
darken($material-color, $material-param-1), darken($material-color, $material-param-1),
lighten($material-color, $material-param-1), lighten($material-color, $material-param-1));
$contrast-factor);
} }
@mixin bg-color-variations($extra, $default, $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) { @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) //setup map to pass parameters (instead of the incredibly long-error-prone list for each and every @include)
$args: ( $args: (
extra: $extra, extra: $extra,
default: $default, default: $default,
mixin-name: $mixin-name, mixin-name: $mixin-name,
material-param-1: $material-param-1, material-param-1: $material-param-1
contrast-factor: $contrast-factor,
); );
// bootstrap styles // bootstrap styles
@ -212,7 +237,7 @@
material-color-name: "inverse", material-color-name: "inverse",
material-color-full-name: "inverse", material-color-full-name: "inverse",
material-color: $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); @include call-variations-content-mixin($args-inverse);
} }
@ -270,7 +295,7 @@
$material-color-number: map-get($args, material-color-number); $material-color-number: map-get($args, material-color-number);
$material-color-full-name: "#{$material-color-name}#{$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-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, ( $args-color: map-merge($args, (

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.navbar { .navbar {
background-color: $primary; background-color: $primary;
border: $zero; border: $zero;

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.panel { .panel {
border-radius: 2px; border-radius: 2px;
border: 0; border: 0;

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.dropdownjs:after { .dropdownjs:after {
right: 5px; right: 5px;
top: 3px; top: 3px;

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.noUi-target, .noUi-target,
.noUi-target * { .noUi-target * {
-webkit-touch-callout: none; -webkit-touch-callout: none;

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
// Support for Selectize plugin // Support for Selectize plugin
// http://brianreavis.github.io/selectize.js/ // http://brianreavis.github.io/selectize.js/

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
// Support for SnackbarJS plugin // Support for SnackbarJS plugin
// https://github.com/FezVrasta/snackbarjs // https://github.com/FezVrasta/snackbarjs

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.popover, .tooltip-inner { .popover, .tooltip-inner {
color: $popover-color; color: $popover-color;
line-height: 1em; line-height: 1em;

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.progress { .progress {
height: 4px; height: 4px;
border-radius: 0; border-radius: 0;

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.form-horizontal .radio { .form-horizontal .radio {
margin-bottom: 10px; margin-bottom: 10px;
} }

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
@mixin shadow-z-1 { @mixin shadow-z-1 {
box-shadow: box-shadow:
0 1px 6px 0 rgba(0, 0, 0, 0.12), 0 1px 6px 0 rgba(0, 0, 0, 0.12),

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.nav-tabs { .nav-tabs {
background: $primary; background: $primary;
> li { > li {

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.togglebutton { .togglebutton {
vertical-align: middle; vertical-align: middle;
&, label, input, .toggle { &, label, input, .toggle {

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
// Material Global vars // Material Global vars
$zero: 0 !default; $zero: 0 !default;

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
body, .container, .container-fluid { body, .container, .container-fluid {
.well.well-sm { .well.well-sm {

View File

@ -1,2 +1,4 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
@import 'material'; @import 'material';
@import '_mixins-fullpalette'; @import '_mixins-fullpalette';

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
@import '_colors'; @import '_colors';
@import '_variables'; @import '_variables';
@import '_mixins'; @import '_mixins';

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
.withripple { .withripple {
position: relative; position: relative;
} }

View File

@ -1,3 +1,5 @@
// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
@import '_variables'; @import '_variables';
@import '_colors'; @import '_colors';