Skip to content

Commit

Permalink
Added some styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiago Porto committed Feb 20, 2016
1 parent 3ffb246 commit 70ef10b
Show file tree
Hide file tree
Showing 14 changed files with 140 additions and 28 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Download with [Bower](http://bower.io/)
* Insert the buttons

```html
<button aria-label="Increase Font" id="accessibility-font" class="js-acessibility"></button>
<button aria-label="Add Contrast" id="accessibility-contrast" class="js-acessibility"></button>
<button aria-label="Increase Font" id="accessibility-font" class="js-acessibility">+A</button>
<button aria-label="Add Contrast" id="accessibility-contrast" class="js-acessibility">Add Contrast</button>
```

**Note:** To `font-size` works, it's necessary work with `em` or `rem` units.
Expand Down Expand Up @@ -88,4 +88,4 @@ Included the $ sign in the variable name of the cached elements for easy identif

## License

Accessibility Buttons is released under the terms of the [MIT license](http://opensource.org/licenses/MIT).
Accessibility Buttons is released under the terms of the [MIT license](http://opensource.org/licenses/MIT).
5 changes: 3 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "accessibility-buttons",
"homepage": "http://tiagoporto.github.io/gerador-validador-cpf/",
"author": {
"name": "Tiago Porto", "email": "[email protected]",
"name": "Tiago Porto",
"email": "[email protected]",
" homepage": "http://tiagoporto.com"
},
"repository": {
Expand All @@ -24,4 +25,4 @@
"contrast",
"font size"
]
}
}
15 changes: 15 additions & 0 deletions dist/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "accessibility-buttons",
"homepage": "https://github.com/tiagoporto/accessibility-buttons",
"authors": [
"Tiago Porto <[email protected]>"
],
"description": "",
"main": "",
"moduleType": [],
"license": "MIT",
"devDependencies": {
"jeet": "^6.1.2",
"normalize-css": "normalize.css#^3.0.3"
}
}
21 changes: 20 additions & 1 deletion dist/css/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ html {
box-sizing: inherit;
}
body {
font: normal normal 16px/1.5em Helvetica, Arial, sans-serif;
font: normal normal 16px/1.5em Lora, 'Times New Roman', Times, Baskerville, Georgia, serif;
background-color: #fff;
color: #000;
text-rendering: optimizeLegibility;
Expand Down Expand Up @@ -244,6 +244,25 @@ select {
color: #8c8c8c;
font-size: 0.875em;
}
.main {
*zoom: 1;
width: auto;
max-width: 900px;
float: none;
display: block;
margin-right: auto;
margin-left: auto;
padding-left: 0;
padding-right: 0;
}
.main:before,
.main:after {
content: '';
display: table;
}
.main:after {
clear: both;
}
/* ==================================================================
Media Queries
================================================================== */
Expand Down
2 changes: 1 addition & 1 deletion dist/css/demo.min.css

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

1 change: 1 addition & 0 deletions dist/css/styles.css

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

1 change: 1 addition & 0 deletions dist/css/styles.min.css

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

96 changes: 85 additions & 11 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Accessibility Buttons</title>
<meta name="description" content="{-}">
<meta name="keywords" content="{-}">
<meta name="description" content="Buttons to add/remove contrast and increase/decrease font size.">
<meta name="keywords" content="accessibility, buttons, bower, lib">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Add to homescreen for Chrome on Android -->
Expand All @@ -27,15 +27,21 @@
<meta name="msapplication-wide310x150logo" content="img/touch/tile-wide.png"/>
<meta name="msapplication-square310x310logo" content="img/touch/tile.png"/>

<link href='https://fonts.googleapis.com/css?family=Lora:400,700' rel='stylesheet' type='text/css'>

<!-- build:css css/styles.combined.min.css -->
<!-- <link rel="stylesheet" href="bower_components/normalize-css/normalize.css"> -->
<link rel="stylesheet" href="css/demo.css">
<link rel="stylesheet" href="css/accessibility-buttons.css">
<!-- endbuild -->

</head>
<body>
<header>
<h1>Accessibility Buttons</h1>

<p>Buttons to add/remove contrast and increase/decrease font size.</p>

<a href="https://github.com/tiagoporto/accessibility-buttons" class="github-corner">
<svg width="80" height="80" viewBox="0 0 250 250">
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
Expand All @@ -45,10 +51,6 @@ <h1>Accessibility Buttons</h1>
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>
</svg>
</a>
</header>

<main class="main">


<a class="github-button"
href="https://github.com/tiagoporto"
Expand Down Expand Up @@ -77,16 +79,88 @@ <h1>Accessibility Buttons</h1>
data-count-aria-label="# stargazers on GitHub"
aria-label="Star tiagoporto/accessibility-buttons on GitHub">Star</a>

</header>

<main class="main">
<div>
<button type="button" aria-label="Increase Font" id="accessibility-font" class="js-acessibility">+A</button>
<button type="button" aria-label="Add Contrast" id="accessibility-contrast" class="js-acessibility">Add Contrast</button>
</div>



<h2>Usage</h2>

<p>Download with <a href="http://bower.io/">Bower</a></p>

<code><pre>bower install accessibility-buttons --save</pre></code>

<p>Buttons to add/remove contrast and increase/decrease font size.</p>

<p>Include the files</p>

<p>
<button aria-label="" id="accessibility-font" class="js-acessibility"></button>
<button aria-label="" id="accessibility-contrast" class="js-acessibility"></button>
</p>
<code><pre>&lt;link rel="stylesheet" href="css/accessibility-buttons.css"&gt;
&lt;script src="js/accessibility-buttons.js"&gt;&lt;/script&gt;</pre></code>



<p>Insert the buttons</p>

<code>
<pre>&lt;button aria-label="Increase Font" id="accessibility-font" class="js-acessibility">+A</button>
&lt;button aria-label="Add Contrast" id="accessibility-contrast" class="js-acessibility">Add Contrast</button></pre>
</code>

<p>Note:** To `font-size` works, it's necessary work with `em` or `rem` units.</p>


<p>Init the plugin</p>

<code>
<pre>accessibilityButtons();</pre>
</code>

<h2>Settings</h2>

<p>To setup buttons names and aria-labels, call the plugin with additional options.</p>

<code>
<pre>accessibilityButtons({
font: {
nameButtonIncrease: '+A', //Default
ariaLabelButtonIncrease: 'Increase Font', //Default
nameButtonDecrease: '-A', //Default
ariaLabelButtonDecrease: 'Decrease Font' //Default
},

contrast: {
nameButtonAdd: 'Add Contrast', //Default
ariaLabelButtonAdd: 'Add Contrast', //Default
nameButtonRemove: 'Remove Contrast', //Default
ariaLabelButtonRemove: 'Remove Contrast' //Default
}
});</pre>
</code>

<p>To change font-size and contrast colors change the values in the `accessibility-buttons.css`.</p>

<code>
<pre>.accessibility-font {
/* First font-size fallback to older browsers*/
font-size: 1.25em;
font-size: 1.25rem;
}

.accessibility-contrast {
color: #fff;
background: #000;
}</pre>
</code>
</main>

<footer>
Copyright © 2014 - 2016 Tiago Porto
</footer>



<!-- build:js js/scripts.combined.min.js -->
Expand Down
6 changes: 3 additions & 3 deletions dist/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
accessibilityButtons({
font: {
nameButtonIncrease: 'Click me and things will be great',
nameButtonDecrease: '-A'
nameButtonDecrease: 'Click me and things will turn to normal size'
},

contrast: {
nameButtonAdd: 'Click me and things will be darken',
nameButtonRemove: 'Remove Contrasttt'
nameButtonRemove: 'Click me and things will be clean again'
}
});
});
2 changes: 1 addition & 1 deletion dist/js/scripts.min.js

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

6 changes: 3 additions & 3 deletions src/scripts/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
accessibilityButtons({
font: {
nameButtonIncrease: 'Click me and things will be great',
nameButtonDecrease: '-A'
nameButtonDecrease: 'Click me and things will turn to normal size'
},

contrast: {
nameButtonAdd: 'Click me and things will be darken',
nameButtonRemove: 'Remove Contrasttt'
nameButtonRemove: 'Click me and things will be clean again'
}
});
});
3 changes: 2 additions & 1 deletion src/stylesheets/components/_main.styl
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
// .main
.main
center(900px)
2 changes: 1 addition & 1 deletion src/stylesheets/demo.styl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// @import "helpers/_vetor-sprite"

// Vendors
// @import "../../dist/bower_components/"
@import "../../dist/bower_components/jeet/stylus/jeet/index.styl"

// Vertical Rhythm module from Compass ported to Stylus
@import "../vendors/vertical-rhythm-port-from-compass/_vertical-rhythm"
Expand Down
Loading

0 comments on commit 70ef10b

Please sign in to comment.