This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/1.4.0: (27 commits) Fix 1.4.0 compare link → 1.4.0 Mention missing changes/additions in 1.4.0 Limit styleguide color boxes to a maximum width of 256px Add “npm run validate” to “Build setup” chapter Mention custom categories renderer Adjust themes to recent sidebar changes Fix validation errors Implement custom sidebar menu/renderer Mention HTML Validator as new addition Remove obsolete links Fix html validation errors Add html validation script Use actual browserlist query in link Mention PostCSS as addition Update dependencies Add PostCSS autoprefixer with “last 2 versions” as browserlist Use #!/usr/bin/env bash Ignore gemini reports folder Also test hover state in button-primary ...
- Loading branch information
Showing
26 changed files
with
932 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ node_modules/ | |
build/ | ||
styleguide/ | ||
docs/ | ||
gemini/reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
requirejs(['tree', 'highlight'], function (Tree, HighlightJS) { | ||
HighlightJS.initHighlighting(); | ||
|
||
var $tree = document.querySelector('[data-tree]'); | ||
|
||
if ($tree) { | ||
Tree.create($tree); | ||
} | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest | ||
window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,o=(this.document||this.ownerDocument).querySelectorAll(e),n=this;do for(t=o.length;--t>=0&&o.item(t)!==n;);while(0>t&&(n=n.parentElement));return n}); | ||
|
||
define(function () { | ||
function Tree($el) { | ||
$el.addEventListener('click', function (e) { | ||
var $button = e.target.closest('[data-expand]'); | ||
var $branch = e.target.closest('[data-branch]'); | ||
|
||
if ($button === null || $branch === null) { | ||
return; | ||
} | ||
|
||
if (e.altKey) { | ||
this.deepToggle($branch); | ||
} else { | ||
this.toggle($branch); | ||
} | ||
|
||
e.preventDefault(); | ||
}.bind(this)); | ||
} | ||
|
||
Tree.prototype.deepToggle = function($el) { | ||
var $branch = $el; | ||
var action = $el.classList.contains('-open') ? 'remove' : 'add'; | ||
|
||
do { | ||
this.toggle($branch, action); | ||
} while ($branch = $branch.querySelector('[data-branch]')); | ||
} | ||
|
||
Tree.prototype.toggle = function($el, force, classes) { | ||
$el.classList[force ? force : 'toggle'].call( | ||
$el.classList, '-open', classes | ||
); | ||
} | ||
|
||
return { | ||
create: function ($el) { | ||
return new Tree($el); | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<% if (Array.isArray(items) && items.length > 0) { %> | ||
<ul class="branches styleguide-tree-branches" data-branches> | ||
<% items.forEach((item) => { %> | ||
<% const submenu = | ||
include('./menu', { | ||
items: item.children | ||
}) | ||
%> | ||
<% const hasActive = submenu.indexOf('-active') >= 0 || item.isCurrent %> | ||
<li class="branch styleguide-tree-branch<% if (hasActive) { %> -active -open<%} %>" data-branch> | ||
<% if (item.children.length > 0) { %> | ||
<button class="expand" data-expand></button> | ||
<% } %> | ||
<a class="label" href="<%= item.href %>"><%= item.name %></a> | ||
<%- submenu %> | ||
</li> | ||
<% }) %> | ||
</ul> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
PATH=$(npm bin):$PATH; | ||
|
||
# @see https://github.com/kimmobrunfeldt/concurrently | ||
|
Oops, something went wrong.