์ด CSS ์ฝ๋๋ "Guardian Headline Full"์ด๋ผ๋ ์ฌ์ฉ์ ์ ์ ๊ธ๊ผด ํจ๋ฐ๋ฆฌ๋ฅผ ์ ์ํ๋ฉฐ, ์ฌ๋ฌ ๊ธ๊ผด ๋๊ป์ ์คํ์ผ์ ํฌํจํฉ๋๋ค. ๋ผ์ดํธ, ๋ ๊ทค๋ฌ, ๋ฏธ๋์, ์ธ๋ฏธ๋ณผ๋ ๋๊ป๊ฐ ๊ฐ๊ฐ ์ผ๋ฐ์ฒด์ ์ดํค๋ฆญ์ฒด ๋ณํ์ผ๋ก ํฌํจ๋์ด ์์ต๋๋ค. ๊ธ๊ผด์ ๋ค์ํ ๋ธ๋ผ์ฐ์ ๊ฐ ํธํ์ฑ์ ๋ณด์ฅํ๊ธฐ ์ํด Guardian ์๋ฒ์์ WOFF2, WOFF, TrueType ํ์์ผ๋ก ๋ก๋๋ฉ๋๋ค.
@font-face {
font-family: Guardian Headline Full;
src: url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-Bold.woff2) format("woff2"),
url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-Bold.woff) format("woff"),
url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-Bold.ttf) format("truetype");
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: Guardian Headline Full;
src: url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-BoldItalic.woff2) format("woff2"),
url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-BoldItalic.woff) format("woff"),
url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-BoldItalic.ttf) format("truetype");
font-weight: 700;
font-style: italic;
}
@font-face {
font-family: Guardian Headline Full;
src: url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-Black.woff2) format("woff2"),
url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-Black.woff) format("woff"),
url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-Black.ttf) format("truetype");
font-weight: 900;
font-style: normal;
}
@font-face {
font-family: Guardian Headline Full;
src: url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-BlackItalic.woff2) format("woff2"),
url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-BlackItalic.woff) format("woff"),
url(https://assets.guim.co.uk/static/frontend/fonts/guardian-headline/noalts-not-hinted/GHGuardianHeadline-BlackItalic.ttf) format("truetype");
font-weight: 900;
font-style: italic;
}
@font-face {
font-family: Guardian Titlepiece;
src: url(https://assets.guim.co.uk/static/frontend/fonts/guardian-titlepiece/noalts-not-hinted/GTGuardianTitlepiece-Bold.woff2) format("woff2"),
url(https://assets.guim.co.uk/static/frontend/fonts/guardian-titlepiece/noalts-not-hinted/GTGuardianTitlepiece-Bold.woff) format("woff"),
url(https://assets.guim.co.uk/static/frontend/fonts/guardian-titlepiece/noalts-not-hinted/GTGuardianTitlepiece-Bold.ttf) format("truetype");
font-weight: 700;
font-style: normal;
}
@media (min-width: 71.25em) {
.content__main-column--interactive {
margin-left: 160px;
}
}
@media (min-width: 81.25em) {
.content__main-column--interactive {
margin-left: 240px;
}
}
.content__main-column--interactive .element-atom {
max-width: 620px;
}
@media (max-width: 46.24em) {
.content__main-column--interactive .element-atom {
max-width: 100%;
}
}
.content__main-column--interactive .element-showcase {
margin-left: 0;
}
@media (min-width: 46.25em) {
.content__main-column--interactive .element-showcase {
max-width: 620px;
}
}
@media (min-width: 71.25em) {
.content__main-column--interactive .element-showcase {
max-width: 860px;
}
}
.content__main-column--interactive .element-immersive {
max-width: 1100px;
}
@media (max-width: 46.24em) {
.content__main-column--interactive .element-immersive {
width: calc(100vw - var(--scrollbar-width, 0px));
position: relative;
left: 50%;
right: 50%;
margin-left: calc(-50vw + var(--half-scrollbar-width, 0px)) !important;
margin-right: calc(-50vw + var(--half-scrollbar-width, 0px)) !important;
}
}
@media (min-width: 46.25em) {
.content__main-column--interactive .element-immersive {
transform: translate(-20px);
width: calc(100% + 60px);
}
}
@media (max-width: 71.24em) {
.content__main-column--interactive .element-immersive {
margin-left: 0;
margin-right: 0;
}
}
@media (min-width: 71.25em) {
.content__main-column--interactive .element-immersive {
transform: translate(0);
width: auto;
}
}
@media (min-width: 81.25em) {
.content__main-column--interactive .element-immersive {
max-width: 1260px;
}
}
.content__main-column--interactive p,
.content__main-column--interactive ul {
max-width: 620px;
}
.content__main-column--interactive:before {
position: absolute;
top: 0;
height: calc(100% + 15px);
min-height: 100px;
content: "";
}
@media (min-width: 71.25em) {.content__main-column--interactive:before {
border-left: 1px solid #dcdcdc;
z-index: -1;
left: -10px;
}
@media (min-width: 81.25em) {
.content__main-column--interactive:before {
border-left: 1px solid #dcdcdc;
left: -11px;
}
}
.content__main-column--interactive .element-atom {
margin-top: 0;
margin-bottom: 0;
padding-bottom: 12px;
padding-top: 12px;
}
.content__main-column--interactive p + .element-atom {
padding-top: 0;
padding-bottom: 0;
margin-top: 12px;
margin-bottom: 12px;
}
.content__main-column--interactive .element-inline {
max-width: 620px;
}
@media (min-width: 61.25em) {
figure[data-spacefinder-role="inline"].element {
max-width: 620px;
}
}
:root {
--dateline: #606060;
--headerBorder: #dcdcdc;
--captionText: #999;
--captionBackground: hsla(0, 0%, 7%, 0.72);
--feature: #c70000;
--new-pillar-colour: var(--primary-pillar, var(--feature));
}
:root:root {
--subheading-text: var(--secondary-pillar);
--pullquote-text: var(--secondary-pillar);
--pullquote-icon: var(--secondary-pillar);
--block-quote-text: var(--article-text);
}
:root:root blockquote {
--block-quote-fill: var(--secondary-pillar);
}
@media (prefers-color-scheme: dark) {
:root:root:not([data-color-scheme="light"]) {
--subheading-text: var(--darkmode-pillar);
--pullquote-text: var(--darkmode-pillar);
--pullquote-icon: var(--darkmode-pillar);
}
:root:root:not([data-color-scheme="light"]) blockquote {
--block-quote-fill: var(--darkmode-pillar);
}
}
.content__main-column--interactive .element.element-atom,
.element.element-atom {
padding: 0;
}
#article-body > div .element-atom:first-of-type + p:first-of-type,
#article-body > div .element-atom:first-of-type + .sign-in-gate + p:first-of-type,
#article-body > div .element-atom:first-of-type + #sign-in-gate + p:first-of-type,
#article-body > div hr:not(.last-horizontal-rule) + p,
.content--interactive > div .element-atom:first-of-type + p:first-of-type,
.content--interactive > div .element-atom:first-of-type + .sign-in-gate + p:first-of-type,
.content--interactive > div .element-atom:first-of-type + #sign-in-gate + p:first-of-type,
.content--interactive > div hr:not(.last-horizontal-rule) + p,
#comment-body .element-atom:first-of-type + p:first-of-type,
#comment-body .element-atom:first-of-type + .sign-in-gate + p:first-of-type,
#comment-body .element-atom:first-of-type + #sign-in-gate + p:first-of-type,
#comment-body hr:not(.last-horizontal-rule) + p,
[data-gu-name="body"] .element-atom:first-of-type + p:first-of-type,
[data-gu-name="body"] .element-atom:first-of-type + .sign-in-gate + p:first-of-type,
[data-gu-name="body"] .element-atom:first-of-type + #sign-in-gate + p:first-of-type,
[data-gu-name="body"] hr:not(.last-horizontal-rule) + p,
#feature-body .element-atom:first-of-type + p:first-of-type,
#feature-body .element-atom:first-of-type + .sign-in-gate + p:first-of-type,
#feature-body .element-atom:first-of-type + #sign-in-gate + p:first-of-type,
#feature-body hr:not(.last-horizontal-rule) + p {
padding-top: 14px;
}
#article-body > div .element-atom:first-of-type + p:first-of-type:first-letter,
#article-body > div .element-atom:first-of-type + .sign-in-gate + p:first-of-type:first-letter,
#article-body > div .element-atom:first-of-type + #sign-in-gate + p:first-of-type:first-letter,
#article-body > div hr:not(.last-horizontal-rule) + p:first-letter,
.content--interactive > div .element-atom:first-of-type + p:first-of-type:first-letter,
.content--interactive > div .element-atom:first-of-type + .sign-in-gate + p:first-of-type:first-letter,
.content--interactive > div .element-atom:first-of-type + #sign-in-gate + p:first-of-type:first-letter,
.content--interactive > div hr:not(.last-horizontal-rule) + p:first-letter,
#comment-body .element-atom:first-of-type + p:first-of-type:first-letter,
#comment-body .element-atom:first-of-type + .sign-in-gate + p:first-of-type:first-letter,
#comment-body .element-atom:first-of-type + #sign-in-gate + p:first-of-type:first-letter,
#comment-body hr:not(.last-horizontal-rule) + p:first-letter,
[data-gu-name="body"] .element-atom:first-of-type + p:first-of-type:first-letter,
[data-gu-name="body"] .element-atom:first-of-type + .sign-in-gate + p:first-of-type:first-letter,
[data-gu-name="body"] .element-atom:first-of-type + #sign-in-gate + p:first-of-type:first-letter,
[data-gu-name="body"] hr:not(.last-horizontal-rule) + p:first-letter,
#feature-body .element-atom:first-of-type + p:first-of-type:first-letter,๊ธฐ์ฌ ๋ณธ๋ฌธ์ ์ฒซ ๋ฒ์งธ ๋จ๋ฝ, ๋๋ ๋ก๊ทธ์ธ ๊ฒ์ดํธ๋ ์ํ์ ๊ณผ ๊ฐ์ ํน์ ์์ ๋ค์ ์ค๋ ์ฒซ ๋ฒ์งธ ๋จ๋ฝ์ ์ฒซ ๊ธ์๋ ํฐ ๋๋กญ ์บก์ผ๋ก ์คํ์ผ๋ง๋ฉ๋๋ค. ํน์ ํค๋๋ผ์ธ ๊ธ๊ผด์ ์ฌ์ฉํ๋ฉฐ, ๋ณผ๋์ฒด, ๋๋ฌธ์, ์์์ด ์ง์ ๋๊ณ , ํฌ๊ธฐ๋ 111px, ์ค ๋์ด๋ 92px์
๋๋ค. ์์ ์ฌ๋ฐฑ๊ณผ ํจ๊ป ์ผ์ชฝ์ผ๋ก ๋ ์์ต๋๋ค.
์ํ์ ๋ฐ๋ก ๋ค์ ์ค๋ ๋จ๋ฝ์ ์๋จ ํจ๋ฉ์ด ์์ต๋๋ค. ๊ธฐ์ฌ ๋ณธ๋ฌธ ๋ด ํ์ฟผํธ๋ ์ต๋ ๋๋น 620px๋ก ์ ํ๋ฉ๋๋ค.
์ผ์ผ์ด์ค ์์์ ์บก์
์ ์ ์ ์ผ๋ก ์์นํ๋ฉฐ ์ต๋ ๋๋น 620px์ ๊ฐ์ง๋๋ค. ๋ชฐ์
ํ ์์๋ ์คํฌ๋กค๋ฐ๋ฅผ ์กฐ์ ํ์ฌ ์ ์ฒด ๋ทฐํฌํธ ๋๋น๋ฅผ ์ฐจ์งํฉ๋๋ค. ๋ ํฐ ํ๋ฉด์์๋ ์ต๋ ๋๋น๋ก ์ ํ๋๊ณ , ๋ ์์ ํ๋ฉด์์๋ ์กฐ์ ๋ ์ฌ๋ฐฑ์ผ๋ก ๊ฐ์ฅ์๋ฆฌ๊น์ง ํ์ฅ๋ฉ๋๋ค. ๋ชฐ์
ํ ์์์ ์บก์
์ ๋ฐ์ํ ํจ๋ฉ์ ๊ฐ์ง๋๋ค.
๋ ๋์ ํ๋ฉด์ ๊ฒฝ์ฐ, ๊ธฐ์ฌ ํค๋๋ ์ ์๋ ์ด๊ณผ ํ์ ๊ฐ์ง CSS ๊ทธ๋ฆฌ๋ ๋ ์ด์์์ ์ฌ์ฉํฉ๋๋ค. ์ด ๊ทธ๋ฆฌ๋๋ ์ ๋ชฉ, ํค๋๋ผ์ธ, ๋ฉํ๋ฐ์ดํฐ, ์คํ ๋ํผ์คํธ๋ฅผ ๊ตฌ์ฑํฉ๋๋ค. ํค๋๋ผ์ธ์๋ ์๋จ ํ
๋๋ฆฌ๊ฐ ์๊ณ , ๋ฉํ๋ฐ์ดํฐ๋ ์์ ์๋จ ํจ๋ฉ์ผ๋ก ์์นํฉ๋๋ค. ์คํ ๋ํผ์คํธ ๋ด ๋งํฌ๋ ์ฌ์ฉ์ ์ ์ ์์์ผ๋ก ๋ฐ์ค์ด ๊ทธ์ด์ง๋ฉฐ, ํธ๋ฒ ์ ์์์ด ๋ณ๊ฒฝ๋๊ณ , ๋ชฉ๋ก ํญ๋ชฉ์ ๊ธ๊ผด ํฌ๊ธฐ๋ 20px์
๋๋ค. ์คํ ๋ํผ์คํธ์ ์ฒซ ๋ฒ์งธ ๋จ๋ฝ์ ํน๋ณํ ์คํ์ผ๋ง์ด ํ์๋์ง ์์ต๋๋ค.์ต์ ๋๋น 61.25em ์ด์์ ํ๋ฉด์์, ์คํ ๋ํผ์คํธ ์์ ๋ด ์ฒซ ๋ฒ์งธ ๋จ๋ฝ์ ์๋จ ํ
๋๋ฆฌ๋ฅผ ๊ฐ์ง๋ฉฐ ํ๋จ ํจ๋ฉ์ด ์์ต๋๋ค. ํ๋ฉด ๋๋น๊ฐ ์ต์ 71.25em ์ด์์ธ ๊ฒฝ์ฐ, ์ด ์๋จ ํ
๋๋ฆฌ๋ ์ ๊ฑฐ๋ฉ๋๋ค.
์ต์ ๋๋น 61.25em ์ด์์ ํ๋ฉด์์, ๊ฐ๊ตฌ ๋ํผ ๋ด์ ๊ทธ๋ฆผ์ ์ผ์ชฝ ์ฌ๋ฐฑ์ด ์์ผ๋ฉฐ, ํน์ ์ญํ ์ ๊ฐ์ง ์ธ๋ผ์ธ ๊ทธ๋ฆผ์ ์ต๋ ๋๋น 630px์ ๊ฐ์ง๋๋ค.
์ต์ ๋๋น 71.25em ์ด์์ ํ๋ฉด์์, ๊ฐ๊ตฌ ๋ํผ๋ ์ด๊ณผ ํ์ ๋ํ ์์ธํ ๊ทธ๋ฆฌ๋ ๋ ์ด์์์ ์ฌ์ฉํฉ๋๋ค. ๋ฉํ ์น์
์์ ์ฅ์์ ์ด ๋ํ๋๋ฉฐ, ์คํ ๋ํผ์คํธ ๋จ๋ฝ์ ์๋จ ํ
๋๋ฆฌ๋ฅผ ์๊ณ ๋์ ์ผ์ชฝ ํ
๋๋ฆฌ๋ฅผ ์ป์ต๋๋ค.
์ต์ ๋๋น 81.25em ์ด์์ ๋ ๋์ ํ๋ฉด์์, ๊ทธ๋ฆฌ๋ ํ
ํ๋ฆฟ์ ๋ค๋ฅธ ์ด ๋ฐ ํ ํ ๋น์ผ๋ก ์กฐ์ ๋ฉ๋๋ค. ๋ฉํ ์น์
์์ ์ฅ์์ ์ ๋ ๋์ด์ง๊ณ , ์คํ ๋ํผ์คํธ์ ์ผ์ชฝ ํ
๋๋ฆฌ๊ฐ ์ฝ๊ฐ ์ด๋ํฉ๋๋ค.
ํค๋๋ผ์ธ์ ํน์ ๊ธ๊ผด ๋๊ป, ํฌ๊ธฐ ๋ฐ ์ต๋ ๋๋น๋ฅผ ๊ฐ์ง๋ฉฐ, ์ด๋ ๋ ํฐ ํ๋ฉด์์ ๋ณ๊ฒฝ๋ฉ๋๋ค. ํน์ ํค๋ผ์ธ์ ์ค๊ฐ ํฌ๊ธฐ ํ๋ฉด์์ ์จ๊ฒจ์ง๋ฉฐ, ํด๋น SVG ํ์ ์ ์๋ ํ
๋๋ฆฌ ์์์ ์ฌ์ฉํฉ๋๋ค.
๋ฉํ ์น์
๋ด ์์
๋ฐ ๋๊ธ ์์๋ ๋์ผํ ํ
๋๋ฆฌ ์์์ ์ฌ์ฉํฉ๋๋ค. ๋ฉํ ์น์
๋ด ํน์ ์ปจํ
์ด๋๋ ์จ๊ฒจ์ง๋๋ค.
์คํ ๋ํผ์คํธ ์น์
์ ์์ ์ผ์ชฝ ์ฌ๋ฐฑ๊ณผ ์๋์ ์์น๋ฅผ ๊ฐ์ง๋ฉฐ, ์ค๊ฐ ํ๋ฉด์์ ์กฐ์ ๋ ํจ๋ฉ์ ๊ฐ์ง๋๋ค. ํด๋น ๋จ๋ฝ์ ์ ์๋ ๊ธ๊ผด ์์ฑ์ ๊ฐ์ง๋๋ค.
์ฃผ ๋ฏธ๋์ด ์์ญ์ ์๋์ ์ผ๋ก ์์นํ๋ฉฐ, ํน์ ์ฌ๋ฐฑ์ ๊ฐ์ง๊ณ 'portrait' ๊ทธ๋ฆฌ๋ ์์ญ์ ๋ฐฐ์น๋ฉ๋๋ค.CSS ์ฝ๋๋ ๋ค์ํ ์์์ ๋ํ ์คํ์ผ์ ์ค์ ํฉ๋๋ค. ํน์ div๋ฅผ ์ธก๋ฉด ์ฌ๋ฐฑ ์์ด ์ ์ฒด ๋๋น๋ก ๋ง๋ญ๋๋ค. ๋ ํฐ ํ๋ฉด์ ๊ฒฝ์ฐ, ๋ฏธ๋์ด ์์์์ ํ๋จ ์ฌ๋ฐฑ์ ์ ๊ฑฐํฉ๋๋ค. ๋ ์์ ํ๋ฉด์ ๊ฒฝ์ฐ, ๋ฏธ๋์ด ์์๋ ๋๋น๋ฅผ ์กฐ์ ํ๊ณ ์์ ์ผ์ชฝ ์ฌ๋ฐฑ์ ๊ฐ์ง๋ฉฐ, ์ค๊ฐ-์์ ํ๋ฉด์ ๊ฒฝ์ฐ ์ฝ๊ฐ ์ฆ๊ฐํฉ๋๋ค.
๊ทธ๋ฆผ ์บก์
์ ๋ฐฐ๊ฒฝ์๊ณผ ํน์ ํจ๋ฉ์ผ๋ก ํ๋จ์ ์์นํฉ๋๋ค. ์บก์
๋ด ์ฒซ ๋ฒ์งธ span์ ์จ๊ฒจ์ง๊ณ , ๋ ๋ฒ์งธ๋ ํ์๋๋ฉฐ ๋๋น์ 90%๋ก ์ ํ๋ฉ๋๋ค. ์ค๊ฐ ํ๋ฉด์์