refactor(sass): individual sass files import globals

This commit is contained in:
Adam Bradley
2015-11-23 14:51:38 -06:00
parent 3d898485ad
commit bc8ff4070f
77 changed files with 171 additions and 116 deletions

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Action Sheet
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Action Sheet
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Action Sheet
// --------------------------------------------------
@@ -79,4 +80,3 @@ ion-action-sheet button {
width: auto;
border: none;
}

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS App
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design App
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Z-Index
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Typography
// -------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Badge
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Clear Button
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// FABulous Buttons (Floating Action Button from material)
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Button Icons
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Outline Button
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Button Sizes
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Button Variables
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
button {
&[block] {

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Button
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Card
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Card
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Card
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Checkbox
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Checkbox Structure
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Checkbox
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Content
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Content Padding
// --------------------------------------------------

View File

@@ -1,12 +1,13 @@
/**
* Grid
* --------------------------------------------------
* Using flexbox for the grid, inspired by Philip Walton:
* http://philipwalton.github.io/solved-by-flexbox/demos/grids/
* By default each .col within a .row will evenly take up
* available width, and the height of each .col with take
* up the height of the tallest .col in the same .row.
*/
@import "../../ionic.globals";
// Grid
// --------------------------------------------------
// Using flexbox for the grid, inspired by Philip Walton:
// http://philipwalton.github.io/solved-by-flexbox/demos/grids/
// By default each .col within a .row will evenly take up
// available width, and the height of each .col with take
// up the height of the tallest .col in the same .row.
$grid-padding-width: 10px !default;
$grid-responsive-sm-break: 567px !default; // smaller than landscape phone

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Icon
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Icon
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Item Media
// --------------------------------------------------

View File

@@ -1,9 +1,7 @@
@import "../../ionic.globals";
/**
* The hidden right-side buttons that can be exposed under a list item
* with dragging.
*/
// The hidden right-side buttons that can be exposed under a list item with dragging.
ion-item-sliding {
display: block;
position: relative;

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Item
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Item
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Item
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// List
// --------------------------------------------------
@@ -20,7 +21,7 @@
.list[inset] {
overflow: hidden;
transform: translateZ(0);
ion-header {
background-color: $list-background-color;
}

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS List
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design List
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Menu Reveal
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Menu
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Modals
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Navbar
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Navbar
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Navbar
// --------------------------------------------------
@@ -8,7 +9,7 @@ ion-navbar.toolbar {
}
.back-button {
order: map-get($toolbar-order, backButton);
order: map-get($toolbar-order, backButton);
display: none;
&.show-back-button {

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Popups
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Popups
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Popups
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Radio
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Radio
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Radio
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
ion-scroll {
position: relative;

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Search Bar
// --------------------------------------------------
@@ -137,5 +138,5 @@ ion-searchbar.left-align {
color: $color-value;
}
}
}

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Search Bar
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Search Bar
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Segment
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Segment
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Segment
// --------------------------------------------------

View File

@@ -1,3 +1,5 @@
@import "../../ionic.globals";
ion-swipe-slides {
display: block;
width: 100%;

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Switch
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Switch
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Switch
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Tabs
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Tabs
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Tabs
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Material Design Ripple Effect
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Label
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Text Input
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Text Input
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Text Input
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// iOS Toolbar
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../../ionic.globals";
// Material Design Toolbar
// --------------------------------------------------

View File

@@ -1,3 +1,4 @@
@import "../../ionic.globals";
// Toolbar
// --------------------------------------------------

View File

@@ -1,11 +1,6 @@
// Theme
@import "themes/default";
// Globals
// Core App
@import
"util/mixins",
"components/app/normalize",
"components/app/structure",
"components/app/typography",
@@ -50,6 +45,7 @@
// Ionicons
// soon to be replaced with SVGs
$font-path: "../fonts" !default;
$ionicons: true !default;
@if ($ionicons) {

11
ionic/ionic.globals.scss Normal file
View File

@@ -0,0 +1,11 @@
// Global Theme
@import "themes/default";
// Global Functions
@import "util/functions";
// Global Mixins
@import "util/mixins";

View File

@@ -1,12 +0,0 @@
{
"ecmaFeatures": {
"blockBindings": true,
"arrowFunctions": true,
"classes": true,
"forOf": true,
"modules": true,
},
"rules": {
"semi": 2
}
}

View File

@@ -1,3 +1,4 @@
@import "../ionic.globals";
// iOS Cordova
// --------------------------------------------------

View File

@@ -18,7 +18,7 @@ $background-color: #222 !default;
$list-text-color: $text-color !default;
$list-background-color: $background-color !default;
$list-border-color: #666 !default;
$list-border-color: #666 !default;
$link-color: map-get($colors, primary) !default;

62
ionic/util/functions.scss Normal file
View File

@@ -0,0 +1,62 @@
// Color Functions
// --------------------------------------------------
@function inverse($color-value) {
@if (lightness($color-value) > 70) {
@return #000;
}
@else {
@return #fff;
}
}
@function darken-or-lighten($color-value, $amount:8%) {
// lightness is a percent value, 0% darkest, 100% lightest
$lightness-percent: lightness($color-value);
@if ($lightness-percent > 80) {
// really light foreground color, so really darken it up
@return darken($color-value, ($amount * 2));
}
@if ($lightness-percent < 35) {
// dark foreground color, so light it up
@return lighten($color-value, $amount * 2);
}
// default to darken
@return darken($color-value, $amount);
}
@function color($color-name) {
@return map-get($colors, $color-name);
}
@function auxiliary-colors() {
// get a map of all the colors, except "primary"
@return map-remove($colors, primary);
}
// String Replace Function
// --------------------------------------------------
@function str-replace($string, $search, $replace: '') {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
}
// URL Encode Function
// --------------------------------------------------
@function url-encode($val) {
@return str-replace($val, ' ', '%20');
}

View File

@@ -1,46 +1,4 @@
// Color Functions
// --------------------------------------------------
@function inverse($color-value) {
@if (lightness($color-value) > 70) {
@return #000;
}
@else {
@return #fff;
}
}
@function darken-or-lighten($color-value, $amount:8%) {
// lightness is a percent value, 0% darkest, 100% lightest
$lightness-percent: lightness($color-value);
@if ($lightness-percent > 80) {
// really light foreground color, so really darken it up
@return darken($color-value, ($amount * 2));
}
@if ($lightness-percent < 35) {
// dark foreground color, so light it up
@return lighten($color-value, $amount * 2);
}
// default to darken
@return darken($color-value, $amount);
}
@function color($color-name) {
@return map-get($colors, $color-name);
}
@function auxiliary-colors() {
// get a map of all the colors, except "primary"
@return map-remove($colors, primary);
}
// Appearance
// --------------------------------------------------
@@ -50,19 +8,15 @@
}
// User Select None
// Calc
// --------------------------------------------------
@mixin user-select-none() {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
@mixin calc($property, $expression) {
#{$property}: -webkit-calc(#{$expression});
#{$property}: calc(#{$expression});
}
// Input Placeholder
// --------------------------------------------------
@@ -81,31 +35,6 @@
}
// String Replace Function
// --------------------------------------------------
@function str-replace($string, $search, $replace: '') {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
}
// URL Encode Function
// --------------------------------------------------
@function url-encode($val) {
@return str-replace($val, ' ', '%20');
}
// SVG Background Image Mixin
// --------------------------------------------------
@@ -115,11 +44,12 @@
}
// calc()
// User Select None
// --------------------------------------------------
@mixin calc($property, $expression) {
#{$property}: -webkit-calc(#{$expression});
#{$property}: calc(#{$expression});
@mixin user-select-none() {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

View File

@@ -1,3 +1,4 @@
@import "../ionic.globals";
.align-left {
text-align: left;