Skip to content

Commit

Permalink
Documentation (#42)
Browse files Browse the repository at this point in the history
* Organization and cleanup
* Moved sassdoc dest to docs from sassdoc
* document breakpoints and neat grid media queries
* Removed base from sassdoc
* Split up the groups in to more groups
* Group example
* Moar documentation
* rename and document  _color to _colors (for color map)
* Document set container padding
* Add import to color_theme so that required variables are there
* fixup! WIP
* organize variables
* Merge conflict fixes
* !fixup source order conflicts
* !fixup leading commas on rollup
  • Loading branch information
kgcreative authored Apr 20, 2017
1 parent a5f992d commit 4bff9cc
Show file tree
Hide file tree
Showing 166 changed files with 4,117 additions and 512 deletions.
136 changes: 134 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,142 @@ module.exports = function(grunt) {
},
target: ['core/\*\*/\*.scss']
},
// Examples: https://github.com/SassDoc/grunt-sassdoc/blob/master/Gruntfile.js
sassdoc: {
default: {
src: 'core',
}
options: {
dest: 'docs/core',
verbose: 0,
autofill: ['requires', 'throws'],
exclude: [
'vendors/*',
'base/*'
],
display: {
sort: [
'group<',
'access',
'line>',
'file',
],
},
},
},
base: {
src: 'core/base',
options: {
dest: 'docs/base',
verbose: 0,
autofill: ['requires', 'throws'],
display: {
sort: [
'group<',
'access',
'line>',
'file',
],
},
groups: {
'base|typography': 'Typography',
},
},
},
components: {
src: 'core/components',
options: {
dest: 'docs/components',
verbose: 0,
autofill: ['requires', 'throws'],
display: {
sort: [
'group<',
'access',
'line>',
'file',
],
},
},
},
functions: {
src: 'core/utilities/functions',
options: {
dest: 'docs/functions',
verbose: 0,
autofill: ['requires', 'throws'],
display: {
sort: [
'group<',
'access',
'line>',
'file',
],
},
},
},
mixins: {
src: 'core/utilities/mixins',
options: {
dest: 'docs/mixins',
verbose: 0,
autofill: ['requires', 'throws'],
display: {
sort: [
'group<',
'access',
'line>',
'file',
],
},
},
},
placeholders: {
src: 'core/utilities/placeholders',
options: {
dest: 'docs/placeholders',
verbose: 0,
autofill: ['requires', 'throws'],
display: {
sort: [
'group<',
'access',
'line>',
'file',
],
},
},
},
variables: {
src: 'core/utilities/variables',
options: {
dest: 'docs/variables',
verbose: 0,
autofill: ['requires', 'throws'],
display: {
sort: [
'group<',
'access',
'line>',
'file',
],
},
groups: {
'variables|bourbon': 'Bourbon Settings',
'variables|neat': 'Neat Settings',
'variables|decanter': 'Decanter Settings',
'variables|animations': 'Animations',
'variables|borders': 'Borders',
'variables|breakpoint-boundaries': 'Breakpoints',
'variables|grid-media': 'Grid Media',
'variables|buttons': 'Buttons',
'variables|colors': 'Colors',
'variables|containers': 'Containers',
'variables|forms': 'Forms',
'variables|typography': 'Typography',
'variables|vertical-rhythm': 'Vertical Rhythm',
},
},
},
},
sass: {
// This will compile all of our sass files
Expand Down Expand Up @@ -94,7 +226,7 @@ module.exports = function(grunt) {
'examples/**/*.scss',
'examples/**/*.html'
],
tasks: ['sass'],
tasks: ['sass', 'sassdoc'],
options: {
interrupt: true
}
Expand Down
29 changes: 20 additions & 9 deletions core/base/_body.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

////
/// Root html element styles for the body and main elements.
/// Style placement and basic settings for the top level html elements.
/// @group base|body
////

///
/// Body defaults
///
body {
min-height: 100vh;
display: flex;
Expand All @@ -12,20 +17,26 @@ body {
margin: 0;
}

// We rely on source order for mobile-first approach
// in this case:
//
// -50 header
// -40 nav
// 1 main
// 50 footer
//

/// We rely on source order for mobile-first approach
/// in this case:
///
/// -50 header
/// -40 nav
/// 1 main
/// 50 footer
///
body > header { order: -50; }

/// Nav html element.
body > nav { order: -40; }

/// Main html element of body.
body > main { order: 1; }

// footer html element of body.
body > footer { order: 50; }

/// Main html element.
main {
overflow: hidden;
background-color: color(background);
Expand Down
15 changes: 8 additions & 7 deletions core/base/_box-model.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,29 @@

////
/// Box model default styles.
/// @group html
/// @group base|box-model
////

// @import '../utilities/settings/settings';
/// Set up a decent box model on the root element.

// 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/
/// 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 {
@include font-size($base-font-size, $root-font-size);
}
4 changes: 1 addition & 3 deletions core/base/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

////
/// Button base styles.
/// @group base
/// @group base|buttons
////

// @import '../utilities/utilities';

/// Generic Button Styles.
/// @require {function} color Returns a color from the color map.
/// @require {function} em normalized relative values.
Expand Down
2 changes: 1 addition & 1 deletion core/base/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
////
/// Base font styles.
/// This file contains all @font-face declarations, if any.
/// @group base
/// @group base|fonts
////

//// Load the font-face declarations.
Expand Down
15 changes: 6 additions & 9 deletions core/base/_forms.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
@charset "UTF-8";
////
/// Form base styles.
/// @group html
/// @group base|forms
////

//@import '../utilities/settings/settings';

// Fieldset defaults.
/// Fieldset defaults.
fieldset {
background-color: transparent;
border: 0;
Expand Down Expand Up @@ -43,16 +41,15 @@ textarea {
}

/// All Text Input defaults.
/// @require bourbon
/// @require {function} color
/// @require {mixin} on-event
/// @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;
Expand Down Expand Up @@ -92,7 +89,7 @@ textarea {
}
}

// Text area styles.
/// Text area styles.
textarea {
resize: vertical;
}
Expand Down
12 changes: 7 additions & 5 deletions core/base/_lists.scss
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
@charset "UTF-8";
////
/// List base styles.
/// @group html
/// @group base|lists
////

// @import '../utilities/settings/settings';

// List classes.
/// List classes.
ul.plain,
ol.plain {
list-style-type: none;
margin: 0;
padding: 0;
}

/// plain
dl.plain {
margin: 0;
}

/// plain
dt.plain {
font-weight: 600;
margin: 0;
}

/// plain
dd.plain {
margin: 0;
}
Expand All @@ -38,6 +38,7 @@ ol {
}
}

/// uls
ul {
list-style: disc;
ul {
Expand Down Expand Up @@ -83,6 +84,7 @@ li > ol {
dl {
margin: 0 0 modular-scale(-5);
}
/// dt
dt {
font-weight: 600;
}
Expand Down
2 changes: 1 addition & 1 deletion core/base/_media-elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

////
/// Meida base styles.
/// @group html
/// @group base|media
////

// @import '../utilities/settings/settings';
Expand Down
2 changes: 1 addition & 1 deletion core/base/_tables.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@charset "UTF-8";
////
/// Media base styles.
/// @group html
/// @group base|tables
////

//@import '../utilities/settings/settings';
Expand Down
2 changes: 1 addition & 1 deletion core/base/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@charset "UTF-8";
////
/// This file contains Site-wide typography base styles.
/// @group html
/// @group base|typography
////

// @import '../utilities/settings/settings';
Expand Down
Loading

0 comments on commit 4bff9cc

Please sign in to comment.