Skip to content

Commit

Permalink
Merge pull request #25 from washingtonstateuniversity/feature/cleanup…
Browse files Browse the repository at this point in the history
…-issues

Catch all PR to cleanup outstanding issues
  • Loading branch information
nicdford authored Nov 27, 2019
2 parents b13fb73 + d9febcb commit a0a9668
Show file tree
Hide file tree
Showing 25 changed files with 368 additions and 124 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ trim_trailing_whitespace = true
spaces_around_operators = true
spaces_around_brackets = both
indent_size = 4
end_of_line = lf

[*.{txt,md}]
trim_trailing_whitespace = false
Expand Down
27 changes: 27 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"extends": "eslint:recommended",
"plugins": [],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module",
"experimentalDecorators": true,
"allowImportExportEverywhere": true
},
"rules": {
"no-console": "warn",
"no-var": "error",
"prefer-const": "error",
"semi": "error",
"no-unused-vars": "warn"
},
"globals": {
"Modernizr": true,
"window": true,
"document": true
},
"env": {
"node": true,
"browser": true
}
}
113 changes: 113 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"rules": {
"at-rule-empty-line-before": [ "always", {
except: ["blockless-after-blockless", "first-nested"],
ignore: ["after-comment"],
} ],
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
"at-rule-no-unknown": [ true, {
ignoreAtRules: ["use", "forward", "import", "mixin", "include", "function", "if", "else", "return", "extend", "error", "warn", "debug"],
} ],
"at-rule-semicolon-newline-after": "always",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always",
"block-opening-brace-newline-after": "always",
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"color-hex-length": "short",
"color-named": [ "never", {
ignore: ["inside-function"]
} ],
"color-no-invalid-hex": true,
"comment-empty-line-before": [ "always", {
ignore: ["stylelint-commands"],
} ],
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-no-duplicate-properties": [ true, {
ignore: ["consecutive-duplicates"],
} ],
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-space-before": "never",
"declaration-block-trailing-semicolon": "always",
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"font-family-name-quotes": "always-where-recommended",
"font-weight-notation": "numeric",
"function-calc-no-unspaced-operator": true,
"function-comma-space-after": "always",
"function-comma-space-before": "never",
"function-linear-gradient-no-nonstandard-direction": true,
"function-max-empty-lines": 1,
"function-name-case": "lower",
"function-parentheses-space-inside": "never",
"function-url-quotes": "never",
"function-whitespace-after": "always",
"indentation": "tab",
"keyframe-declaration-no-important": true,
"length-zero-no-unit": true,
"max-empty-lines": 2,
"max-line-length": [ 80, {
"ignore": "non-comments",
} ],
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"no-eol-whitespace": true,
"no-extra-semicolons": true,
"no-invalid-double-slash-comments": true,
"no-missing-end-of-source-newline": true,
"number-leading-zero": "never",
"number-no-trailing-zeros": true,
"property-case": "lower",
"property-no-unknown": true,
"rule-empty-line-before": [ "always", {
except: ["after-single-line-comment"]
} ],
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-attribute-quotes": "always",
"selector-class-pattern": [
"^[a-z]+(-[a-z]+)*",
{
"message": "Selector should use lowercase and separate words with hyphens (selector-class-pattern)",
},
],
"selector-id-pattern": [
"^[a-z]+(-[a-z]+)*",
{
"message": "Selector should use lowercase and separate words with hyphens (selector-id-pattern)",
},
],
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-list-comma-newline-after": "always",
"selector-list-comma-space-before": "never",
"selector-max-empty-lines": 0,
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-colon-notation": "single",
"selector-pseudo-element-no-unknown": true,
"selector-type-case": "lower",
"selector-type-no-unknown": true,
"shorthand-property-no-redundant-values": true,
"string-no-newline": true,
"string-quotes": "double",
"unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": "lower",
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
}
}
49 changes: 49 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
sudo: false
language: php

# Cache some data across builds for performance.
cache:
apt: true
directories:
- node_modules
- vendor
- $HOME/.composer/cache

notifications:
email:
on_success: never
on_failure: change
slack:
on_pull_requests: true
on_success: change
on_failure: always
on_start: never
on_cancel: always
rooms:
- wsu-ucomm:n2TLZRJd84rMOMbkKthSEMgS

branches:
only:
- master

matrix:
include:
- php: 7.1
env: WP_TRAVISCI=grunt

before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- mysql --version
- phpenv config-rm xdebug.ini
- phpenv versions
- php --version
- composer install
- nvm install stable
- npm install -g grunt-cli
- npm install
- npm --version
- node --version

script:
- grunt --version
- grunt default
90 changes: 52 additions & 38 deletions assets/dist/main.css

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions assets/dist/scripts.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 19 additions & 25 deletions assets/src/scss/base/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
//
// Color Mixin
//
@function color($palette, $tone: 'base') {
@function color($palette, $tone: "base") {
@return map-get(map-get($colors, $palette), $tone);
}



//
// Media Queries
//
// Example: @include mq('small') { color: red; }
// Example: @include mq("small") { color: red; }
//
$breakpoints: (
"small": 768px,
Expand All @@ -21,21 +19,21 @@ $breakpoints: (
@mixin mq($width, $type: min) {
@if map_has_key($breakpoints, $width) {
$width: map_get($breakpoints, $width);

@if $type == max {
$width: $width - 1px;
}

@media only screen and (#{$type}-width: $width) {
@content;
}
}
}



//
// Z-index
//
// Example: z-index: z('site-header');
// Example: z-index: z("site-header");
//
$z-indexes: (
"outdated-browser",
Expand All @@ -48,24 +46,22 @@ $z-indexes: (
@function z($name) {
@if index($z-indexes, $name) {
@return (length($z-indexes) - index($z-indexes, $name)) + 1;
} @else {
@warn 'There is no item "#{$name}" in this list; choose one of: #{$z-indexes}';
}

@else {
@warn "There is no item "#{$name}" in this list; choose one of: #{$z-indexes}";
@return null;
}
}



//
// Clear Margin
//
// Example: @include clear-margin(left);
@mixin clear-margin($position: bottom) {
margin-#{$position}: 0;
margin-#{$position}: 0;
}



//
// Clear Padding
//
Expand All @@ -74,24 +70,23 @@ $z-indexes: (
padding-#{$position}: 0;
}



//
// Layout Tools
//
// Example: @include row("fixed", 4);
@mixin row($type: fixed, $padding-modifier: 1) {
display: flex;

margin: 0 auto;
padding: 0 $global-base-unit * $padding-modifier;

@if ($type == "fixed") {
max-width: $global-grid-size;
}

@else {
max-width: 100%;
}

display: flex;
margin: 0 auto;
padding: 0 $global-base-unit * $padding-modifier;
}

@mixin column($count: 1) {
Expand All @@ -103,18 +98,17 @@ $z-indexes: (
}

@mixin gutter() {
padding-left: $global-base-unit;
padding-right: $global-base-unit;
padding-left: $global-base-unit;
}




//
// Add required psuedo element properties
//
@mixin psuedo($position: relative) {
content: "";
position: $position;

display: block;

content: "";
}
7 changes: 5 additions & 2 deletions assets/src/scss/base/_print.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
@media print {

html {
background-color: #fff;
}

body,
body.has-background-image,
body:not(.has-background-image) {
background-image: none;
background-color: #fff;
min-height: 100%;

background-color: #fff;
background-image: none;
}

a,
.sup-header-default a {
text-decoration: underline;

color: #333;
}

Expand Down
8 changes: 7 additions & 1 deletion assets/src/scss/base/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ body {
font-size: $global-font-size;
}

h1, h2, h3, h4, h5, h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
line-height: 1;

@include clear-margin();
}

Expand Down
Loading

0 comments on commit a0a9668

Please sign in to comment.