Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>AMCSS - Attribute Modules for CSS</title><meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, minimal-ui"><meta name="breakpoint" content="small" media="(max-width: 520px)"><meta name="breakpoint" content="medium" media="(min-width: 521px) and (max-width: 900px)"><meta name="breakpoint" content="large" media="(min-width: 901px)"><script type="text/javascript">
!function(a,b){"use strict";var c={breakpoints:{},_isTicking:!1,_debounceLastTime:0,_namedEvents:{},_eventMatchCache:{},_globalEvents:[],onBreakpointChange:function(){var a=Array.prototype.slice.call(arguments),b=a.pop(),d=a.pop();"undefined"==typeof d?c._globalEvents.push(b):(c._namedEvents[d]=[]).push(b),k()}},d=function(c){/in/.test(b.readyState)?a.setTimeout(function(){d(c)},9):c()},e=function(a,b){var c=a.className.split(" "),d=c.indexOf(b);d>-1&&(c.splice(d,1),a.className=c.join(" "))},f=function(a,b){-1===a.className.indexOf(b)&&(a.className=""!==a.className?a.className+" "+b:b)},g=function(a,c){var d="breakpoint-"+c,g=b.documentElement;a?f(g,d):e(g,d)},h=function(a){c._globalEvents.forEach(function(b){"function"==typeof b&&b(a)})},i=function(){c._isTicking||j(k),c._isTicking=!0},j=function(b,d){if(!a.requestAnimationFrame){var e=(new Date).getTime(),f=Math.max(0,16-(e-c._debounceLastTime)),g=a.setTimeout(function(){b(e+f)},f);return c._debounceLastTime=e+f,g}a.requestAnimationFrame(b,d)},k=function(){c._isTicking=!1;var b=[];for(var d in c.breakpoints){var e=c.breakpoints[d],f=a.matchMedia(e).matches;if(c._namedEvents[d]&&c._eventMatchCache[d]!==f){c._eventMatchCache[d]=f;for(var i=0;i<c._namedEvents[d].length;i++){var j=c._namedEvents[d][i];"function"==typeof j&&j(f)}}f&&b.push(d),g(f,d)}0!==b.length&&h(b)},l=function(){for(var a=b.getElementsByTagName("meta"),d=0;d<a.length;d++)if("breakpoint"===a[d].name){var e=a[d].getAttribute("content"),f=a[d].getAttribute("media");c.breakpoints[e]=f}},m=function(){l(),k()},n=function(){l(),k(),a.addEventListener("resize",i)};"undefined"!=typeof module&&module.exports?module.exports=c:a.metaQuery=c,m(),d(n)}(window,document);</script><link rel="stylesheet" href="/styles/main.css"></head><body><header am-HomepageHero="am-HomepageHero"><h1>AMCSS</h1><h2><span>Attribute Modules</span> for CSS</h2></header><main><section am-Example="am-Example"><p>Attribute Modules (AM) is a technique for using HTML <strong>attributes</strong> and their <strong>values</strong> rather than classes for styling elements. In doing so, each attribute effectively declares a separate namespace for encapsulating style information, resulting in more readable and maintainable HTML &amp; CSS.</p>
<p>It&#39;s not a framework or a library, it&#39;s a style that better describes the components you&#39;re building. For an introduction to how AM was developed, see the <a href="http://glenmaddern.com/articles/introducing-am-css">original blog post</a> by Glen Maddern. The <a href="http://amcss.github.io/">specification itself</a> is available on GitHub.</p>
<p>It&#39;s not a framework or a library, it&#39;s a style that better describes the components you&#39;re building. For an introduction to how AM was developed, see the <a href="http://glenmaddern.com/articles/introducing-am-css">original blog post</a> by Glen Maddern. The <a href="https://github.com/amcss/attribute-module-specification/">specification itself</a> is available on GitHub.</p>
</section><section am-Example="am-Example"><h3><strong>Example:</strong> Bootstrap Buttons</h3><p>Buttons are one of the strongest use-cases for AM. Here we&#39;ve converted some of Bootstrap&#39;s button markup as an example.</p>
<pre><code><span am-Code="comment">&lt;!-- Large primary button --&gt;
</span>&lt;a <span am-Code="removed">class=&quot;btn btn-primary btn-lg&quot;</span>&gt;Large primary button&lt;/a&gt;
Expand Down Expand Up @@ -49,4 +49,4 @@
ga('create', 'UA-32408977-7', 'auto');
ga('send', 'pageview');</script><script>[].forEach.call(document.querySelectorAll('[am-Example] a[href^=http]'), function(el) {
el.setAttribute('target', '_blank');
})</script></body></html>
})</script></body></html>