Skip to content

Commit

Permalink
Compile (#11)
Browse files Browse the repository at this point in the history
* Move items around a bit
* Compile SassDoc
  • Loading branch information
sherakama authored and kgcreative committed Feb 16, 2017
1 parent a2e2946 commit 792d18d
Show file tree
Hide file tree
Showing 57 changed files with 1,081 additions and 198 deletions.
8 changes: 7 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ module.exports = function(grunt) {
options: {
configFile: '.sass-lint.yml'
},
target: ['\*\*/\*.scss']
target: ['core/\*\*/\*.scss']
},
sassdoc: {
default: {
src: 'core',
}
}
});

// This is where we tell Grunt we plan to use this plug-in.
grunt.loadNpmTasks('grunt-sass-lint');
grunt.loadNpmTasks('grunt-available-tasks');
grunt.loadNpmTasks('grunt-sassdoc');

// This is where we tell Grunt what to do when we type "grunt" into the terminal.
grunt.registerTask('default', ['availabletasks']);
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ module.exports = function(grunt) {
includePaths: [
"node_modules/bourbon/core",
"node_modules/bourbon-neat/core",
"node_modules" // <-- this one will allow you to import decanter.
"node_modules/decanter/core", // <-- this one will allow you to import decanter.
"node_modules"
],
sourceMap: true,
// This controls the compiled css and can be changed to nested, compact or compressed.
Expand Down Expand Up @@ -73,7 +74,7 @@ Example:
Configuration
---

Please see _VARIABLES.scss_ configuration document.
Please see [docs/CONFIGURATION.md](docs/CONFIGURATION.md) document.


Troubleshooting
Expand Down
5 changes: 0 additions & 5 deletions base/README.md

This file was deleted.

12 changes: 0 additions & 12 deletions base/_base.scss

This file was deleted.

25 changes: 0 additions & 25 deletions base/_box-model.scss

This file was deleted.

18 changes: 0 additions & 18 deletions base/_fonts.scss

This file was deleted.

12 changes: 0 additions & 12 deletions base/_media-elements.scss

This file was deleted.

15 changes: 15 additions & 0 deletions core/base/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Base

Base rules consist of styling for HTML elements only, such as used in a CSS
reset or Normalize.css. Base rules should never include class selectors.
To avoid ‘undoing’ styles in components, base styles should reflect the
simplest possible appearance of each element. For example, the simplest usage
of the ul element may be completely unstyled, removing list markers and
indents and relying on a component class for other applications.

The `base/` folder holds what we might call the boilerplate code for the project.
In there, you might find some typographic rules, and probably a stylesheet
(that I’m used to calling `base.scss`), defining some standard styles for
commonly used HTML elements.

Reference: [Sass Guidelines](http://sass-guidelin.es/) > [Architecture](http://sass-guidelin.es/#architecture) > [Base folder](http://sass-guidelin.es/#base-folder)
28 changes: 28 additions & 0 deletions core/base/_box-model.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
////
/// Box model default styles.
/// @group html
////

@charset "UTF-8";
@import '../utilities/settings/settings';

// Set up a decent box model on the root element.
html {
font-size: 62.5%; // 1rem = 10px;
box-sizing: border-box;
}

// Make all elements from the DOM inherit from the parent box-sizing
// Since `*` has a specificity of 0, it does not override the `html` value
// making all elements inheriting from the root box-sizing value
// See: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
*, *::before, *::after {
box-sizing: inherit;
}

/// Set the base body font size.
/// @require {function} em Relative unit function
/// @require {variable} $base-font-size Base font size
body {
font-size: em($base-font-size, 10px);
}
35 changes: 27 additions & 8 deletions base/_buttons.scss → core/base/_buttons.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
@charset "UTF-8";

@import '../utilities/settings';

// -----------------------------------------------------------------------------
// This file contains all styles related to the button element.
// -----------------------------------------------------------------------------

////
/// Button base styles.
/// @group base
////

@charset "UTF-8";
@import '../utilities/utilities';

/// Generic Button Styles.
/// @require {function} color Returns a color from the color map.
/// @require {function} em normalized relative values.
/// @require {mixin} material-shadow adds a shadow.
/// @require {variable} $base-font-family The default base font styles.
/// @require {variable} $base-line-height Base line height setting.
/// @require {variable} $base-transition Base transition setting.
/// @require {variable} $small-spacing Base small space setting.
%button__generic {
$_font-family: $base-font-family;
$_line-height: $base-line-height;
Expand Down Expand Up @@ -54,6 +61,11 @@
}
}

/// Primary Button Styles.
/// @require {function} em normalized relative values.
/// @require {function} color Returns a color from the color map.
/// @require {placeholder} button__generic
/// @require {variable} $base-spacing
%button__primary {
$_spacing: $base-spacing;

Expand All @@ -71,6 +83,11 @@
}
}

/// Secondary Button Styles.
/// @require {function} em normalized relative values.
/// @require {function} color Returns a color from the color map.
/// @require {placeholder} button__generic
/// @require {variable} $base-spacing
%button__secondary {
$_spacing: $base-spacing;

Expand All @@ -90,6 +107,8 @@
}
}

/// Apply all button styles.
/// @require {placeholder} button__generic
#{$all-buttons} {
@extend %button__generic;
}
23 changes: 23 additions & 0 deletions core/base/_fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
////
/// Base font styles.
/// This file contains all @font-face declarations, if any.
/// @group base
////

@charset "UTF-8";
@import '../utilities/settings/settings';

/// Needs description.
@if(global-variable-exists(monospace-source)) {
@import url($monospace-source);
}

/// Needs description.
@if(global-variable-exists(sans-serif-source)) {
@import url($sans-serif-source);
}

/// Needs description.
@if(global-variable-exists(serif-source)) {
@import url($serif-source);
}
35 changes: 32 additions & 3 deletions base/_forms.scss → core/base/_forms.scss
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
@charset "UTF-8";
////
/// Form base styles.
/// @group html
////

// Dependencies
@import '../utilities/settings';
@charset "UTF-8";
@import '../utilities/settings/settings';

// Fieldset defaults.
fieldset {
background-color: transparent;
border: 0;
margin: 0;
padding: 0;
}

/// Legend defaults.
/// @require {variable} $small-spacing
legend {
$_spacing: $small-spacing;
font-weight: 600;
margin-bottom: $_spacing / 2;
padding: 0;
}

/// Label defaults.
/// @require {variable} $small-spacing
label {
$_spacing: $small-spacing;
display: block;
font-weight: 600;
margin-bottom: $_spacing / 2;
}

/// Input defaults.
/// @require {variable} $base-font-family
input,
select,
textarea {
Expand All @@ -32,6 +42,18 @@ textarea {
font-family: $_font-family;
}

/// All Text Input defaults.
/// @require {variable} $base-border
/// @require {variable} $base-border-radius
/// @require {variable} $form-box-shadow
/// @require {variable} $base-spacing
/// @require {variable} $base-duration
/// @require {variable} $base-timing
/// @require {function} color
/// @require {function} shade
/// @require {function} tint
/// @require {mixin} on-event
/// @group base
#{$all-text-inputs} {
$_border: $base-border;
$_border-radius: $base-border-radius;
Expand Down Expand Up @@ -70,23 +92,30 @@ textarea {
}
}

// Text area styles.
textarea {
resize: vertical;
}

/// Checkboxes and radios
/// @require {variable} $small-spacing
[type="checkbox"],
[type="radio"] {
$_spacing: $small-spacing;
display: inline;
margin-right: $_spacing / 2;
}

/// File fields.
/// @require {variable} $small-spacing
[type="file"] {
$_spacing: $small-spacing;
margin-bottom: $_spacing;
width: 100%;
}

/// Select styles.
/// @require {variable} $small-spacing
select {
$_spacing: $small-spacing;
margin-bottom: $_spacing;
Expand Down
Loading

0 comments on commit 792d18d

Please sign in to comment.