Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #792 from OfficeDev/leddie24/rtl-output-fix
Browse files Browse the repository at this point in the history
Add RTL support for directional MDL2 icons
  • Loading branch information
leddie24 committed Sep 8, 2016
2 parents 2eab5b1 + 14c9ba5 commit 180ac15
Show file tree
Hide file tree
Showing 6 changed files with 345 additions and 389 deletions.
4 changes: 4 additions & 0 deletions gulp/Documentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@ gulp.task('prepare-handlebars', function(cb) {
var jsonFile;
var jsonFileName;

// Loop through DocumentationModels and parse JSON data
for (var i = 0; i < modelFiles.length; i++) {
jsonFile = fs.readFileSync(Config.paths.srcDocumentationModels + '/' + modelFiles[i], 'utf8');
jsonFileName = modelFiles[i].replace('.json', '');
jsonData[jsonFileName] = JSON.parse(jsonFile);
}
// Grab Icon data (in separate folder /src/data/) and parse data
jsonFile = fs.readFileSync(Config.paths.srcData + '/' + 'icons.json', 'utf8');
jsonData['icons'] = JSON.parse(jsonFile);
templateData = jsonData;
cb();
});
Expand Down
1 change: 1 addition & 0 deletions gulp/modules/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var Config = function() {
this.paths.bundlePath = this.paths.dist + '/bundles';

this.paths.srcSamples = this.paths.src + '/samples';
this.paths.srcData = this.paths.src + '/data';
this.paths.srcSass = this.paths.src + '/sass';
this.paths.srcDocs = this.paths.src + '/documentation';
this.paths.srcDocsPages = this.paths.srcDocs + '/pages';
Expand Down
8 changes: 7 additions & 1 deletion src/documentation/pages/Icons/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ <h2>Icons</h2>
<p>Fabric uses a custom font for its iconography. This font contains glyphs that you can scale, color, and style in any way. You can even flip them for right-to-left localization. To use the icons, combine the base ms-Icon class with a modifier class for the specific icon.</p>
<pre><code class="hljs">&#x3C;i class=&#x22;ms-Icon ms-Icon--Mail&#x22; aria-hidden=&#x22;true&#x22;&#x3E;&#x3C;/i&#x3E;</code></pre>
<p>Note the <code>aria-hidden</code> attribute, which prevents screen readers from reading the icon. In cases where meaning is conveyed only through the icon, such as an icon-only navigation bar, be sure to apply an aria-label to the button for accessibility.</p>
@@include('../../templates/modules/content/icon-page.html')
<div class="docs-IconList clearfix">
<ul>
{{#each icons.glyphs}}
{{> IconPageItem this }}
{{/each}}
</ul>
</div>
</div>
@@include('../../templates/modules/components/DocumentationPageFooter.html')
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<li><i class="ms-Icon ms-Icon--{{friendlyName}}"></i>ms-Icon--{{friendlyName}}</li>
Loading

0 comments on commit 180ac15

Please sign in to comment.