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

force txt-bold to be 1em line height, fixes line height offsets, clos… #784

Merged
merged 1 commit into from
May 26, 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
22 changes: 13 additions & 9 deletions src/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,19 @@ textarea {
font-size: 90%; /* mono fonts have naturally large proportions, scale them down to match open sans. */
}

/**
* Apply a bold font weight.
*
* @memberof Type utils
* @example
* <div class='txt-bold'>txt-bold</div>
*/
.txt-bold {
font-weight: bold !important;
/* prevent bold text inside inline text from offsetting line height */
line-height: 1em;
}

/**
* Classes for font size and line height, lists, block quotes, code blocks, and more.
*
Expand Down Expand Up @@ -376,15 +389,6 @@ textarea {
font-weight: normal !important;
}

/**
* Apply a bold font weight.
*
* @memberof Type utils
* @example
* <div class='txt-bold'>txt-bold</div>
*/
.txt-bold { font-weight: bold !important; }

/**
* Italicize text.
*
Expand Down
10 changes: 8 additions & 2 deletions test/__snapshots__/build-css.jest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ textarea{
font-family:'Menlo', 'Bitstream Vera Sans Mono', 'Monaco', 'Consolas', monospace;
font-size:90%;
}
.txt-bold{
font-weight:bold !important;
line-height:1em;
}
.txt-h1{
font-size:45px;
line-height:54px;
Expand Down Expand Up @@ -393,7 +397,6 @@ textarea{
.txt-normal{
font-weight:normal !important;
}
.txt-bold{ font-weight:bold !important; }
.txt-em{ font-style:italic !important; }
.txt-uppercase{ text-transform:uppercase !important; }
.txt-lowercase{ text-transform:lowercase !important; }
Expand Down Expand Up @@ -16732,6 +16735,10 @@ textarea{
font-family:'Menlo', 'Bitstream Vera Sans Mono', 'Monaco', 'Consolas', monospace;
font-size:90%;
}
.txt-bold{
font-weight:bold !important;
line-height:1em;
}
.txt-h1{
font-size:45px;
line-height:54px;
Expand Down Expand Up @@ -16861,7 +16868,6 @@ textarea{
.txt-normal{
font-weight:normal !important;
}
.txt-bold{ font-weight:bold !important; }
.txt-em{ font-style:italic !important; }
.txt-uppercase{ text-transform:uppercase !important; }
.txt-lowercase{ text-transform:lowercase !important; }
Expand Down