Skip to content

Instantly share code, notes, and snippets.

@jberndsen
Created February 10, 2017 15:38
Show Gist options
  • Save jberndsen/7c0aa0c490cb067275028c1872d45146 to your computer and use it in GitHub Desktop.
Save jberndsen/7c0aa0c490cb067275028c1872d45146 to your computer and use it in GitHub Desktop.
Quick ITCSS startup structure for Angular 2 / Material Design
@import '../settings/_colours.scss';
@import '../settings/_typography.scss';
body {
width: 100%;
height: 100%;
min-height: 100vh;
background-color: md-color($vir-app-ui, 50);
font-family: $font-stack;
font-weight: 400;
font-style: normal;
font-variant: normal;
color: black;
}
@import '~@angular/material/core/theming/theming';
@import './theme';
// For styling your custom components using the general theme colours,
// look at https://github.com/angular/material2/blob/master/guides/theming-your-components.md
$primary-color: md-color(map-get($app-theme, primary));
$accent-color: md-color(map-get($app-theme, accent));
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
min-width: 0;
min-height: 0;
}
@import '~@angular/material/core/theming/theming';
@import '~@angular/material/core/theming/palette';
// define our theme colours
$app-primary: md-palette($md-grey);
$app-accent: md-palette($md-blue);
$app-ui: md-palette($md-grey);
// Create the theme object (a Sass map containing all of the palettes).
$app-theme: md-light-theme($app-primary, $app-accent);
@import '~@angular/material/core/theming/all-theme';
@import '../settings/theme';
// Include the base styles for Angular Material core. We include this here so that you only
// have to load a single css file for Angular Material in your app.
@include md-core();
// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include angular-material-theme($app-theme);
$font-stack: 'Roboto', 'Helvetica Neue', Verdana, Helvetiva, sans-serif;
/* Provides styling helpers and methods for more specific layers, e.g. Components likely want to import this */
// Settings
@import "settings/colours";
@import "settings/typography";
@import "settings/theme";
// Tools
@import "tools/flexbox";
/* Styles that should be applied globally go here. Remember to add to styles in agular-cli.json */
// Generic
@import "~normalize.css/normalize.css";
@import "generic/theming";
// Elements
@import "elements/star";
@import "elements/body";
// Objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment