Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix: Move typescale from prototype to typography and enable default! #10351

Merged
merged 3 commits into from
Jul 5, 2017
Merged
Show file tree
Hide file tree
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
31 changes: 0 additions & 31 deletions docs/pages/prototyping-utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,37 +274,6 @@ You can use font styling to style your text. You can change the font styling by

---

## Typescale

Adjust font-size by overriding an element’s default size. This can be useful to size a `<p>` or `<h1>` through `<h6>` using Foundation's existing header sizes.

<div class="callout primary">
<p><strong>Especially useful because:</strong> It's important to avoid skipping heading levels when structuring your document, as it confuses screen readers. For example, after using an <code>&lt;h2&gt;</code> in your code, the next heading used should be either <code>&lt;h2&gt;</code> or <code>&lt;h3&gt;</code>. If you need a heading to look bigger or smaller to match a specific style, use CSS to override the default size.</p>
</div>

For headers:

```html
<h2 class="h1">Lorem Ipsum Dolor</h2>
<h3 class="h2">Lorem Ipsum Dolor</h3>
<h4 class="h3">Lorem Ipsum Dolor</h4>
<h5 class="h4">Lorem Ipsum Dolor</h5>
<h6 class="h5">Lorem Ipsum Dolor</h6>
```

For text:

```html_example
<p class="h1">Lorem Ipsum Dolor</p>
<p class="h2">Lorem Ipsum Dolor</p>
<p class="h3">Lorem Ipsum Dolor</p>
<p class="h4">Lorem Ipsum Dolor</p>
<p class="h5">Lorem Ipsum Dolor</p>
<p class="h6">Lorem Ipsum Dolor</p>
```

---

## List Styling

<div class="primary callout">
Expand Down
31 changes: 31 additions & 0 deletions docs/pages/typography-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,37 @@ In Foundation, the `<ul>` is a bulleted list and `<ol>` is a numbered list by de

---

## Typescale

Adjust font-size by overriding an element’s default size. This can be useful to size a `<p>` or `<h1>` through `<h6>` using Foundation's existing header sizes.

<div class="callout primary">
<p><strong>Especially useful because:</strong> It's important to avoid skipping heading levels when structuring your document, as it confuses screen readers. For example, after using an <code>&lt;h2&gt;</code> in your code, the next heading used should be either <code>&lt;h2&gt;</code> or <code>&lt;h3&gt;</code>. If you need a heading to look bigger or smaller to match a specific style, use CSS to override the default size.</p>
</div>

For headers:

```html
<h2 class="h1">Lorem Ipsum Dolor</h2>
<h3 class="h2">Lorem Ipsum Dolor</h3>
<h4 class="h3">Lorem Ipsum Dolor</h4>
<h5 class="h4">Lorem Ipsum Dolor</h5>
<h6 class="h5">Lorem Ipsum Dolor</h6>
```

For text:

```html_example
<p class="h1">Lorem Ipsum Dolor</p>
<p class="h2">Lorem Ipsum Dolor</p>
<p class="h3">Lorem Ipsum Dolor</p>
<p class="h4">Lorem Ipsum Dolor</p>
<p class="h5">Lorem Ipsum Dolor</p>
<p class="h6">Lorem Ipsum Dolor</p>
```

---

## Statistics

If you're building a dashboard, you might need to display some important numbers *real big*. Just add the `.stat` class to any element to amp up the font size.
Expand Down
4 changes: 0 additions & 4 deletions scss/prototype/_prototype.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
// Rotate Mixin
@import 'rotate';

// Typescale
@import 'typescale';

// Text utilities
@import 'text-utilities';

Expand Down Expand Up @@ -70,7 +67,6 @@
@import 'spacing';

@mixin foundation-prototype-classes {
@include foundation-prototype-typescale;
@include foundation-prototype-text-utilities;
@include foundation-prototype-text-transformation;
@include foundation-prototype-text-decoration;
Expand Down
20 changes: 0 additions & 20 deletions scss/prototype/_typescale.scss

This file was deleted.

14 changes: 7 additions & 7 deletions scss/typography/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,12 @@ $abbr-underline: 1px dotted $black !default;
}

// Headings
h1,
h2,
h3,
h4,
h5,
h6 {
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
font-family: $header-font-family;
font-style: $header-font-style;
font-weight: $header-font-weight;
Expand All @@ -329,7 +329,7 @@ $abbr-underline: 1px dotted $black !default;
@include breakpoint($size) {
@each $header, $header-defs in $headers {
$font-size-temp: 1rem;
#{$header} {
#{$header}, .#{$header} {

@if map-has-key($header-defs, font-size) {
$font-size-temp: rem-calc(map-get($header-defs, font-size));
Expand Down