์ด 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,
๊ธฐ์ฌ ๋ณธ๋ฌธ์ ์ฒซ ๋ฒ์งธ ๋จ๋ฝ์ด๋ ๋ก๊ทธ์ธ ๊ฒ์ดํธ ๋๋ ์ํ์ ๊ณผ ๊ฐ์ ํน์ ์์ ๋ค์ ์ค๋ ์ฒซ ๋ฒ์งธ ๋จ๋ฝ์ ์ฒซ ๊ธ์๋ ํฐ ๋๋กญ ์บก์ผ๋ก ์คํ์ผ๋ง๋ฉ๋๋ค. ํน์ ํค๋๋ผ์ธ ๊ธ๊ผด์ ์ฌ์ฉํ๋ฉฐ, ๋ณผ๋์ฒด, ๋๋ฌธ์, ์ผ์ชฝ์ผ๋ก ํ๋กํ
๋๊ณ ํ
๋ง ๋ณ์๋ก ์์์ด ์ง์ ๋ฉ๋๋ค.
์ํ์ ๋ค์ ์ค๋ ๋จ๋ฝ์ ์๋จ ํจ๋ฉ์ด ์์ต๋๋ค. ๊ธฐ์ฌ ๋ณธ๋ฌธ ๋ด ํ์ฟผํธ๋ ์ต๋ ๋๋น 620ํฝ์
๋ก ์ ํ๋ฉ๋๋ค.
์ผ์ผ์ด์ค ์์์ ์บก์
์ ์ ์ ์ผ๋ก ์์นํ๋ฉฐ ์ต๋ ๋๋น 620ํฝ์
์ ๊ฐ์ง๋๋ค.
๋ชฐ์
ํ ์์๋ ์คํฌ๋กค๋ฐ๋ฅผ ๊ณ ๋ คํ์ฌ ์ ์ฒด ๋ทฐํฌํธ ๋๋น๋ฅผ ์ฐจ์งํฉ๋๋ค. ๋ ํฐ ํ๋ฉด์์๋ ์ต๋ ๋๋น๋ก ์ ํ๋๋ฉฐ, ์บก์
ํจ๋ฉ์ด ๋ค์ํ ํ๋ฉด ํฌ๊ธฐ์ ๋ง๊ฒ ์กฐ์ ๋ฉ๋๋ค. ๋ ์์ ๋ชจ๋ฐ์ผ ํ๋ฉด์์๋ ์ด๋ฌํ ์์๊ฐ ์ผ์ชฝ ๊ฐ์ฅ์๋ฆฌ๋ก ์ด๋ํฉ๋๋ค.
๋ ๋์ ํ๋ฉด์ ๊ฒฝ์ฐ, ๊ธฐ์ฌ ํค๋๋ CSS ๊ทธ๋ฆฌ๋ ๋ ์ด์์์ ์ฌ์ฉํฉ๋๋ค. ์ด ๊ทธ๋ฆฌ๋๋ ์ ๋ชฉ, ํค๋๋ผ์ธ, ๋ฉํ๋ฐ์ดํฐ, ์คํ ๋ํผ์คํธ(๋ถ์ ), ํฌํธ๋ ์ดํธ ์์ญ์ ๊ตฌ์ฑํฉ๋๋ค. ํค๋๋ผ์ธ์๋ ์๋จ ํ
๋๋ฆฌ๊ฐ ์ ์ฉ๋๊ณ , ๋ฉํ๋ฐ์ดํฐ๋ ์์ ์๋จ ํจ๋ฉ์ผ๋ก ์์นํ๋ฉฐ, ์คํ ๋ํผ์คํธ ๋ด ๋งํฌ๋ ์ฌ์ฉ์ ์ ์ ์์์ผ๋ก ๋ฐ์ค์ด ๊ทธ์ด์ง๊ณ ํธ๋ฒ ์ ์์์ด ๋ณ๊ฒฝ๋ฉ๋๋ค.
CSS ์ฝ๋๋ "furniture-wrapper"๋ผ๋ ๋ ์ด์์ ๋ํผ ํด๋์ค์ ๋ํ ์คํ์ผ์ ์ ์ํฉ๋๋ค. ๊ทธ๋ฆฌ๋ ๊ตฌ์กฐ๋ฅผ ์ค์ ํ๊ณ ๋ค์ํ ํ๋ฉด ํฌ๊ธฐ์์ ํค๋๋ผ์ธ, ๋ฉํ ์ ๋ณด, ์คํ ๋ํผ์คํธ(์๊ฐ ํ
์คํธ)์ ๊ฐ์ ๋ค์ํ ์์์ ๋ชจ์๊ณผ ์์น๋ฅผ ์กฐ์ ํฉ๋๋ค.
๋ ํฐ ํ๋ฉด(71.25em ์ด์ ๋๋น)์ ๊ฒฝ์ฐ, ๋ค์ค ์ด ๊ทธ๋ฆฌ๋๋ฅผ ์์ฑํฉ๋๋ค. ํค๋๋ผ์ธ ๊ธ๊ผด ํฌ๊ธฐ๊ฐ ์ฆ๊ฐํ๊ณ ์ฅ์์ ๊ณผ ํ
๋๋ฆฌ๊ฐ ์กฐ์ ๋๊ฑฐ๋ ์ ๊ฑฐ๋ฉ๋๋ค. ์คํ ๋ํผ์คํธ ํ
์คํธ๋ ์ผ์ชฝ์ ์์ง ํ
๋๋ฆฌ๋ฅผ ๊ฐ์ง๋๋ค.
์ค๊ฐ ํ๋ฉด(61.25em์์ 71.25em ์ฌ์ด)์ ๊ฒฝ์ฐ, ์คํ ๋ํผ์คํธ์ ์ฒซ ๋ฒ์งธ ๋จ๋ฝ์์ ์๋จ ํ
๋๋ฆฌ๋ฅผ ์ ๊ฑฐํฉ๋๋ค. ๋ํ ๊ทธ๋ฆผ ์ฌ๋ฐฑ๊ณผ ๋๋น๋ฅผ ์กฐ์ ํฉ๋๋ค.
์ด ๋ฒ์์์ ๊ฐ์ฅ ์์ ํ๋ฉด์ ๊ฒฝ์ฐ, ์คํ ๋ํผ์คํธ์ ์ฒซ ๋ฒ์งธ ๋จ๋ฝ์ ์๋จ ํ
๋๋ฆฌ๋ฅผ ์ถ๊ฐํฉ๋๋ค. ๋ค๋ฅธ ๊ท์น์ ์์
๊ณต์ ๋ฒํผ, ๋๊ธ ์, ๋ ์ด์์ ์ ์ ๊ฐ์์ฑ์ ์ ์ดํ๊ณ CSS ๋ณ์(`--headerBorder`)๋ฅผ ์ฌ์ฉํ์ฌ ํ
๋๋ฆฌ์ ์ ์ ํน์ ์์์ ์ค์ ํฉ๋๋ค.
CSS ์ฝ๋๋ ๋ค์ํ ์์์ ๋ํ ์คํ์ผ์ ์ค์ ํฉ๋๋ค. furniture-wrapper ํด๋์ค ๋ด์ ๋ฏธ๋์ด ์์๋ ๋๋น 100%์ด๊ณ ์ํ ์ฌ๋ฐฑ์ด ์์ต๋๋ค. ๋ ํฐ ํ๋ฉด(61.25em ์ด์)์์๋ ์ด๋ฌํ ๋ฏธ๋์ด ์์์ ํ๋จ ์ฌ๋ฐฑ์ด ์์ต๋๋ค. ๋ ์์ ํ๋ฉด(46.24em ์ดํ)์์๋ ์ ์ฒด ๋ทฐํฌํธ ๋๋น๋ก ์กฐ์ ๋๊ณ ์์ ์ผ์ชฝ ์ฌ๋ฐฑ์ ๊ฐ์ง๋ฉฐ, 30em์์ 46.24em ์ฌ์ด์ ํ๋ฉด์์๋ ์ฝ๊ฐ ์ฆ๊ฐํฉ๋๋ค.
๊ทธ๋ฆผ ์บก์
์ ํน์ ํจ๋ฉ, ๋ฐฐ๊ฒฝ ๋ฐ ํ
์คํธ ์์์ผ๋ก ํ๋จ์ ์ ๋์ ์ผ๋ก ์์นํฉ๋๋ค. ์บก์
๋ด ์ฒซ ๋ฒ์งธ span์ ์จ๊ฒจ์ง๊ณ , ๋ ๋ฒ์งธ๋ ํ์๋๋ฉฐ ๋๋น์ 90%๋ก ์ ํ๋ฉ๋๋ค. 30em ์ด์์ ํ๋ฉด์์๋ ์บก์
ํจ๋ฉ์ด ์ฆ๊ฐํฉ๋๋ค. ์บก์
๋ฒํผ์ ์ํ ๋ฐฐ๊ฒฝ๊ณผ ์ค์ผ์ผ๋ ์์ด์ฝ์ผ๋ก ์ค๋ฅธ์ชฝ ํ๋จ์ ์์นํฉ๋๋ค.
๋งค์ฐ ํฐ ํ๋ฉด(71.25em ์ด์)์ ๋ํํ ์ฝํ
์ธ ์ด์ ๊ฒฝ์ฐ ์์น์ ๋์ด ์กฐ์ ์ด ์ด๋ฃจ์ด์ง๋๋ค. ์ด๋ฌํ ์ด ๋ด์ ์ ๋ชฉ์ ๋๋น๊ฐ 620px๋ก ์ ํ๋ฉ๋๋ค.
์ด๋์ด ๋ฐฐ๊ฒฝ๊ณผ ํผ์ฒ ์์์ ๋ํ ์์ ๋ณ์๊ฐ ์ ์๋๋ฉฐ, iOS ๋ฐ Android์ ๋คํฌ ๋ชจ๋์ ๋ํ ์กฐ์ ์ด ํฌํจ๋ฉ๋๋ค. ์ด๋ฌํ ๋ชจ๋ฐ์ผ ํ๋ซํผ์์๋ ๊ธฐ์ฌ ์ปจํ
์ด๋ ๋ด ํน์ ์์ ๋ค์ ์ค๋ ์ฒซ ๋ฒ์งธ ๋จ๋ฝ์ ์ฒซ ๊ธ์๊ฐ ๋ณด์กฐ ํ๋ฌ ์์์ผ๋ก ์คํ์ผ๋ง๋ฉ๋๋ค. iOS ๋ฐ Android์ ๊ธฐ์ฌ ํค๋๋ ํน์ ์คํ์ผ๋ง์ ๋ฐ์ต๋๋ค.
Android ๊ธฐ๊ธฐ์ ๊ฒฝ์ฐ, ๋๊ธ ๊ธฐ์ฌ์์ ๊ธฐ์ฌ ํค๋ ๋์ด