From 93c4fbc4b9ca78a40af5bbd0e2923fe9d802f0fa Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Tue, 12 Sep 2017 12:01:43 -0400 Subject: [PATCH] Color "skins" (#1242) * Add YIQ Color Contrast mixin * Remove text underline from `.btn` links * Move YIQ variables * Simplify button classes using YIQ color contrast mixin - DRY up button CSS using Sass list and YIQ color contrast mixin. - Move `color` and `background-color` to new `btn--primary` class instead of assinging on the default class. Removes the need to override them. * Add `.btn--primary` to buttons that just had `.btn` * Apply changes to `/docs` * Add `.btn--primary` class * Update CHANGELOG and history * Add sample form * Abstract colors away into Sass variables for easier themeing * Add "dark" skin * Replace hardcoded color with SCSS variable * Invert Font Awesome icons' colors in author sidebar and footer * Add Sass changes to `/docs` * Use primary button type instead of inverse * Add missing `!default` on `$muted-text-color` * Add `contrast` and `sunrise` skin colors * Add `dirt` skin color * Add `air` skin color option * Add `mint` skin color * Add `btn--primary` class to Submit Comment button * Set skin to `default` * Document skin color options * Add note about skin SCSS import Close #1208 --- CHANGELOG.md | 6 +- _config.yml | 2 + _includes/comments.html | 4 +- _layouts/single.html | 2 +- _sass/minimal-mistakes/_archive.scss | 3 +- _sass/minimal-mistakes/_base.scss | 15 +- _sass/minimal-mistakes/_buttons.scss | 127 +-- _sass/minimal-mistakes/_footer.scss | 7 +- _sass/minimal-mistakes/_forms.scss | 16 +- _sass/minimal-mistakes/_mixins.scss | 39 + _sass/minimal-mistakes/_navigation.scss | 852 +++++++++--------- _sass/minimal-mistakes/_notices.scss | 1 + _sass/minimal-mistakes/_page.scss | 9 +- _sass/minimal-mistakes/_sidebar.scss | 4 +- _sass/minimal-mistakes/_syntax.scss | 4 +- _sass/minimal-mistakes/_tables.scss | 6 +- _sass/minimal-mistakes/_utilities.scss | 4 +- _sass/minimal-mistakes/_variables.scss | 175 ++-- _sass/minimal-mistakes/skins/_air.scss | 23 + _sass/minimal-mistakes/skins/_contrast.scss | 34 + _sass/minimal-mistakes/skins/_dark.scss | 24 + _sass/minimal-mistakes/skins/_default.scss | 5 + _sass/minimal-mistakes/skins/_dirt.scss | 15 + _sass/minimal-mistakes/skins/_mint.scss | 23 + _sass/minimal-mistakes/skins/_sunrise.scss | 26 + assets/css/main.scss | 3 +- docs/_config.yml | 2 + docs/_docs/05-configuration.md | 67 +- docs/_docs/15-utility-classes.md | 27 +- docs/_docs/18-history.md | 10 +- docs/_includes/author-profile.html | 8 + docs/_includes/comments.html | 78 +- docs/_includes/footer.html | 5 +- docs/_layouts/single.html | 2 +- docs/_pages/home.md | 5 +- docs/_pages/splash-page.md | 8 +- ...3-01-11-markup-html-tags-and-formatting.md | 11 + docs/_sass/minimal-mistakes/_archive.scss | 3 +- docs/_sass/minimal-mistakes/_base.scss | 15 +- docs/_sass/minimal-mistakes/_buttons.scss | 127 +-- docs/_sass/minimal-mistakes/_footer.scss | 7 +- docs/_sass/minimal-mistakes/_forms.scss | 16 +- docs/_sass/minimal-mistakes/_mixins.scss | 39 + docs/_sass/minimal-mistakes/_navigation.scss | 28 +- docs/_sass/minimal-mistakes/_notices.scss | 1 + docs/_sass/minimal-mistakes/_page.scss | 9 +- docs/_sass/minimal-mistakes/_sidebar.scss | 4 +- docs/_sass/minimal-mistakes/_syntax.scss | 4 +- docs/_sass/minimal-mistakes/_tables.scss | 6 +- docs/_sass/minimal-mistakes/_utilities.scss | 4 +- docs/_sass/minimal-mistakes/_variables.scss | 175 ++-- docs/_sass/minimal-mistakes/skins/_air.scss | 23 + .../minimal-mistakes/skins/_contrast.scss | 34 + docs/_sass/minimal-mistakes/skins/_dark.scss | 24 + .../minimal-mistakes/skins/_default.scss | 5 + docs/_sass/minimal-mistakes/skins/_dirt.scss | 15 + docs/_sass/minimal-mistakes/skins/_mint.scss | 23 + .../minimal-mistakes/skins/_sunrise.scss | 26 + docs/assets/css/main.scss | 3 +- docs/assets/images/air-skin-archive-large.png | Bin 0 -> 31661 bytes docs/assets/images/air-skin-archive.png | Bin 0 -> 12717 bytes docs/assets/images/air-skin-post-large.png | Bin 0 -> 66418 bytes docs/assets/images/air-skin-post.png | Bin 0 -> 16237 bytes .../images/contrast-skin-archive-large.png | Bin 0 -> 37579 bytes docs/assets/images/contrast-skin-archive.png | Bin 0 -> 10261 bytes .../images/contrast-skin-post-large.png | Bin 0 -> 73762 bytes docs/assets/images/contrast-skin-post.png | Bin 0 -> 12565 bytes .../assets/images/dark-skin-archive-large.png | Bin 0 -> 37988 bytes docs/assets/images/dark-skin-archive.png | Bin 0 -> 14248 bytes docs/assets/images/dark-skin-post-large.png | Bin 0 -> 74316 bytes docs/assets/images/dark-skin-post.png | Bin 0 -> 17134 bytes .../assets/images/dirt-skin-archive-large.png | Bin 0 -> 46439 bytes docs/assets/images/dirt-skin-archive.png | Bin 0 -> 16037 bytes docs/assets/images/dirt-skin-post-large.png | Bin 0 -> 74102 bytes docs/assets/images/dirt-skin-post.png | Bin 0 -> 15333 bytes .../assets/images/mint-skin-archive-large.png | Bin 0 -> 31082 bytes docs/assets/images/mint-skin-archive.png | Bin 0 -> 12397 bytes docs/assets/images/mint-skin-post-large.png | Bin 0 -> 68323 bytes docs/assets/images/mint-skin-post.png | Bin 0 -> 16168 bytes .../images/sunrise-skin-archive-large.png | Bin 0 -> 36374 bytes docs/assets/images/sunrise-skin-archive.png | Bin 0 -> 12704 bytes .../assets/images/sunrise-skin-post-large.png | Bin 0 -> 71298 bytes docs/assets/images/sunrise-skin-post.png | Bin 0 -> 16447 bytes test/_config.yml | 1 + test/_pages/splash-page.md | 8 +- ...3-01-11-markup-html-tags-and-formatting.md | 50 +- 86 files changed, 1356 insertions(+), 946 deletions(-) create mode 100644 _sass/minimal-mistakes/skins/_air.scss create mode 100644 _sass/minimal-mistakes/skins/_contrast.scss create mode 100644 _sass/minimal-mistakes/skins/_dark.scss create mode 100644 _sass/minimal-mistakes/skins/_default.scss create mode 100644 _sass/minimal-mistakes/skins/_dirt.scss create mode 100644 _sass/minimal-mistakes/skins/_mint.scss create mode 100644 _sass/minimal-mistakes/skins/_sunrise.scss create mode 100644 docs/_sass/minimal-mistakes/skins/_air.scss create mode 100644 docs/_sass/minimal-mistakes/skins/_contrast.scss create mode 100644 docs/_sass/minimal-mistakes/skins/_dark.scss create mode 100644 docs/_sass/minimal-mistakes/skins/_default.scss create mode 100644 docs/_sass/minimal-mistakes/skins/_dirt.scss create mode 100644 docs/_sass/minimal-mistakes/skins/_mint.scss create mode 100644 docs/_sass/minimal-mistakes/skins/_sunrise.scss create mode 100644 docs/assets/images/air-skin-archive-large.png create mode 100644 docs/assets/images/air-skin-archive.png create mode 100644 docs/assets/images/air-skin-post-large.png create mode 100644 docs/assets/images/air-skin-post.png create mode 100644 docs/assets/images/contrast-skin-archive-large.png create mode 100644 docs/assets/images/contrast-skin-archive.png create mode 100644 docs/assets/images/contrast-skin-post-large.png create mode 100644 docs/assets/images/contrast-skin-post.png create mode 100644 docs/assets/images/dark-skin-archive-large.png create mode 100644 docs/assets/images/dark-skin-archive.png create mode 100644 docs/assets/images/dark-skin-post-large.png create mode 100644 docs/assets/images/dark-skin-post.png create mode 100644 docs/assets/images/dirt-skin-archive-large.png create mode 100644 docs/assets/images/dirt-skin-archive.png create mode 100644 docs/assets/images/dirt-skin-post-large.png create mode 100644 docs/assets/images/dirt-skin-post.png create mode 100644 docs/assets/images/mint-skin-archive-large.png create mode 100644 docs/assets/images/mint-skin-archive.png create mode 100644 docs/assets/images/mint-skin-post-large.png create mode 100644 docs/assets/images/mint-skin-post.png create mode 100644 docs/assets/images/sunrise-skin-archive-large.png create mode 100644 docs/assets/images/sunrise-skin-archive.png create mode 100644 docs/assets/images/sunrise-skin-post-large.png create mode 100644 docs/assets/images/sunrise-skin-post.png diff --git a/CHANGELOG.md b/CHANGELOG.md index e8c1f5fc418c..196237affb72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ - Test strict Front Matter in `/test` site. [#1236](https://github.com/mmistakes/minimal-mistakes/pull/1236) - Rename `gems` key to `plugins`. [#1239](https://github.com/mmistakes/minimal-mistakes/pull/1239) +- Add [YIQ Color Contrast](https://github.com/easy-designs/yiq-color-contrast) mixin for determining lightness of a color. +- DRY up button CSS using Sass lists and YIQ Color Contrast mixin. +- Add `btn--primary` button class. **Note:** elements that were previously using only a `.btn` class will now also need `.btn--primary` (eg. `my link`). +- Add `air`, `contrast`, `dark`, `dirt`, `mint`, and `sunrise` skin color options. [#1208](https://github.com/mmistakes/minimal-mistakes/issues/1208) ## [4.5.2](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.5.2) @@ -27,7 +31,7 @@ - Reduce amount of blank pages when printing in Chrome. [#1196](https://github.com/mmistakes/minimal-mistakes/issues/1196) - Remove `#disqus_thread` duplicate from `comments-providers/disqus.html` as it is already in `comments.html` include. [#1199](https://github.com/mmistakes/minimal-mistakes/issues/1199) - Fix Liquid syntax errors in `tag-list.html` and `category-list.html` includes by removing parenthesis in `assign`s. [#1223](https://github.com/mmistakes/minimal-mistakes/issues/1223) -- Fix Liquid syntax error: "Expected id but found open_square in `"{{page.[include.id] }}"`" in `gallery` and `feature_row` includes. +- Fix Liquid syntax error: "Expected id but found open_square in `"{{ page.[include.id] }}"`" in `gallery` and `feature_row` includes. - Fix Liquid syntax error: "Expected end_of_string but found pipe in `"name in __names | sort"`" in `group-by-array` include. ## [4.5.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.5.1) diff --git a/_config.yml b/_config.yml index 4746534ed4ab..141be417f2f6 100644 --- a/_config.yml +++ b/_config.yml @@ -5,6 +5,8 @@ # For technical reasons, this file is *NOT* reloaded automatically when you use # `jekyll serve`. If you change this file, please restart the server process. +minimal_mistakes_skin : "default" # "air", "contrast", "dark", "dirt", "mint", "sunrise" + # Site Settings locale : "en" title : "Site Title" diff --git a/_includes/comments.html b/_includes/comments.html index 1df73b3d4ea0..332374eecda6 100644 --- a/_includes/comments.html +++ b/_includes/comments.html @@ -84,7 +84,7 @@

{{ site.data.ui-text[site.locale].comments_labe

- +
@@ -94,4 +94,4 @@

{{ site.data.ui-text[site.locale].comments_labe {% when "custom" %}
{% endcase %} - + \ No newline at end of file diff --git a/_layouts/single.html b/_layouts/single.html index 7d3273524773..4a297941ee03 100644 --- a/_layouts/single.html +++ b/_layouts/single.html @@ -35,7 +35,7 @@
{{ content }} - {% if page.link %}
{{ site.data.ui-text[site.locale].ext_link_label | default: "Direct Link" }}
{% endif %} + {% if page.link %}
{{ site.data.ui-text[site.locale].ext_link_label | default: "Direct Link" }}
{% endif %}