Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

H2 styling tweaks round 2 #412

Merged
merged 21 commits into from
Apr 11, 2019
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
1 change: 1 addition & 0 deletions packages/components/psammead-headings/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 1.1.1 | [PR#412](https://github.com/bbc/psammead/pull/412) Make SubHeading padding-bottom 24px instead of 16px |
| 1.1.0 | [PR#424](https://github.com/bbc/psammead/pull/424) Add Snyk badge to readme |
| 1.0.0 | [PR#421](https://github.com/bbc/psammead/pull/421) Add support for different scripts typographies |
| 0.4.3 | [PR#418](https://github.com/bbc/psammead/pull/418) Add language variants knob to Headings |
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-headings/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/components/psammead-headings/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-headings",
"version": "1.1.0",
"version": "1.1.1",
"main": "dist/index.js",
"description": "React styled components for a Headline and SubHeading",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ exports[`SubHeading component attribute id should render without double quotes 1
color: #3F3F42;
font-family: ReithSans,Helvetica,Arial,sans-serif;
margin: 0;
padding: 1rem 0;
padding: 1.5rem 0;
font-weight: 700;
}

Expand All @@ -101,7 +101,7 @@ exports[`SubHeading component attribute id should render without double quotes 1
}
}

@media (min-width:25rem) {
@media (min-width:37.5rem) {
.c0 {
padding-top: 2rem;
}
Expand All @@ -123,7 +123,7 @@ exports[`SubHeading component attribute id should render without exclamation mar
color: #3F3F42;
font-family: ReithSans,Helvetica,Arial,sans-serif;
margin: 0;
padding: 1rem 0;
padding: 1.5rem 0;
font-weight: 700;
}

Expand All @@ -141,7 +141,7 @@ exports[`SubHeading component attribute id should render without exclamation mar
}
}

@media (min-width:25rem) {
@media (min-width:37.5rem) {
.c0 {
padding-top: 2rem;
}
Expand All @@ -163,7 +163,7 @@ exports[`SubHeading component attribute id should render without quotes 1`] = `
color: #3F3F42;
font-family: ReithSans,Helvetica,Arial,sans-serif;
margin: 0;
padding: 1rem 0;
padding: 1.5rem 0;
font-weight: 700;
}

Expand All @@ -181,7 +181,7 @@ exports[`SubHeading component attribute id should render without quotes 1`] = `
}
}

@media (min-width:25rem) {
@media (min-width:37.5rem) {
.c0 {
padding-top: 2rem;
}
Expand All @@ -203,7 +203,7 @@ exports[`SubHeading component should render correctly 1`] = `
color: #3F3F42;
font-family: ReithSans,Helvetica,Arial,sans-serif;
margin: 0;
padding: 1rem 0;
padding: 1.5rem 0;
font-weight: 700;
}

Expand All @@ -221,7 +221,7 @@ exports[`SubHeading component should render correctly 1`] = `
}
}

@media (min-width:25rem) {
@media (min-width:37.5rem) {
.c0 {
padding-top: 2rem;
}
Expand All @@ -243,7 +243,7 @@ exports[`SubHeading component should render correctly with arabic script typogra
color: #3F3F42;
font-family: ReithSans,Helvetica,Arial,sans-serif;
margin: 0;
padding: 1rem 0;
padding: 1.5rem 0;
font-weight: 700;
}

Expand All @@ -261,7 +261,7 @@ exports[`SubHeading component should render correctly with arabic script typogra
}
}

@media (min-width:25rem) {
@media (min-width:37.5rem) {
.c0 {
padding-top: 2rem;
}
Expand Down
11 changes: 4 additions & 7 deletions packages/components/psammead-headings/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from 'styled-components';
import { objectOf, object } from 'prop-types';
import { C_SHADOW } from '@bbc/psammead-styles/colours';
import {
GEL_SPACING_DBL,
GEL_SPACING_TRPL,
GEL_SPACING_QUAD,
} from '@bbc/gel-foundations/spacings';
import {
Expand All @@ -11,10 +11,7 @@ import {
GEL_FF_REITH_SANS,
GEL_FF_REITH_SERIF,
} from '@bbc/gel-foundations/typography';
import {
MEDIA_QUERY_TYPOGRAPHY,
GEL_GROUP_2_SCREEN_WIDTH_MIN,
} from '@bbc/gel-foundations/breakpoints';
import { MEDIA_QUERY_TYPOGRAPHY } from '@bbc/gel-foundations/breakpoints';

export const Headline = styled.h1`
${props => (props.script ? getCanon(props.script) : '')};
Expand All @@ -39,8 +36,8 @@ export const SubHeading = styled.h2.attrs(({ text }) => ({
color: ${C_SHADOW};
font-family: ${GEL_FF_REITH_SANS};
margin: 0; /* Reset */
padding: ${GEL_SPACING_DBL} 0;
@media (min-width: ${GEL_GROUP_2_SCREEN_WIDTH_MIN}) {
padding: ${GEL_SPACING_TRPL} 0;
${MEDIA_QUERY_TYPOGRAPHY.LAPTOP_AND_LARGER} {
pjlee11 marked this conversation as resolved.
Show resolved Hide resolved
padding-top: ${GEL_SPACING_QUAD};
}
font-weight: 700;
Expand Down