Browse Source

fixed distance between headers and their labels

writing-page-updates
eupiteco 6 years ago
parent
commit
2148f28b10
  1. 72
      _includes/visuals/typography.html
  2. 11
      _site/assets/styles/main.css
  3. 19
      _site/assets/styles/visuals.scss
  4. 74
      _site/visuals/index.html
  5. 19
      assets/styles/visuals.scss

72
_includes/visuals/typography.html

@ -3,38 +3,48 @@
<p class="text-muted">Our main typography is Source Sans made by Adobe.</p> <p class="text-muted">Our main typography is Source Sans made by Adobe.</p>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12 typography__headers">
<p class="text-black small text-muted">H1 <div class="typography__headers__item">
<h1>Protect communications from monitoring</h1> <p class="text-black small text-muted">H1</p>
</p> <h1>Protect communications from monitoring</h1>
<p class="text-black small text-muted">H2 </div>
<h2>Protect communications from monitoring</h2> <div class="typography__headers__item">
</p> <p class="text-black small text-muted">H2</p>
<p class="text-black small text-muted">H3 <h2>Protect communications from monitoring</h2>
<h3>Protect communications from monitoring</h3> </div>
</p> <div class="typography__headers__item">
<p class="text-black small text-muted">H4 <p class="text-black small text-muted">H3</p>
<h4>Protect communications from monitoring</h4> <h3>Protect communications from monitoring</h3>
</p> </div>
<p class="text-black small text-muted">H5 <div class="typography__headers__item">
<h5>Protect communications from monitoring</h5> <p class="text-black small text-muted">H4</p>
</p> <h4>Protect communications from monitoring</h4>
<p class="text-black small text-muted">H6 </div>
<h6>Protect communications from monitoring</h6> <div class="typography__headers__item">
</p> <p class="text-black small text-muted">H5</p>
<h5>Protect communications from monitoring</h5>
</div>
<div class="typography__headers__item">
<p class="text-black small text-muted">H6</p>
<h6>Protect communications from monitoring</h6>
</div>
<p class="text-black small pt-5 text-muted">H1 display <div class="typography__headers__item">
<h1 class="header-display color-secondary">I2P Anonymous Network</h1> <p class="text-black small pt-5 text-muted">H1 display</p>
</p> <h1 class="header-display color-secondary">I2P Anonymous Network</h1>
<p class="text-black small text-muted">H2 display </div>
<h2 class="header-display color-secondary">I2P Anonymous Network</h2> <div class="typography__headers__item">
</p> <p class="text-black small text-muted">H2 display</p>
<p class="text-black small text-muted">H3 display <h2 class="header-display color-secondary">I2P Anonymous Network</h2>
<h3 class="header-display color-secondary">I2P Anonymous Network</h3> </div>
</p> <div class="typography__headers__item">
<p class="text-black small text-muted">H4 display <p class="text-black small text-muted">H3 display</p>
<h4 class="header-display color-secondary">I2P Anonymous Network</h4> <h3 class="header-display color-secondary">I2P Anonymous Network</h3>
</p> </div>
<div class="typography__headers__item">
<p class="text-black small text-muted">H4 display</p>
<h4 class="header-display color-secondary">I2P Anonymous Network</h4>
</div>
</div> </div>
</div> </div>
<div class="row pt-5"> <div class="row pt-5">

11
_site/assets/styles/main.css

@ -67,16 +67,19 @@
.header-display::before { background: #60AB60; content: " "; display: inline-block; width: 7px; } .header-display::before { background: #60AB60; content: " "; display: inline-block; width: 7px; }
h1.header-display::before { height: 3.75rem; transform: translate(-15px, 0.9375rem); } h1.header-display::before { height: 3.75rem; transform: translate(-15px, 0); margin-bottom: -0.937rem; }
h2.header-display::before { height: 3rem; transform: translate(-15px, 0.75rem); } h2.header-display::before { height: 3rem; transform: translate(-15px, 0); margin-bottom: -0.75rem; }
h3.header-display::before { height: 2.625rem; transform: translate(-15px, 0.65625rem); } h3.header-display::before { height: 2.625rem; transform: translate(-15px, 0); margin-bottom: -0.65625rem; }
h4.header-display::before { height: 2.25rem; transform: translate(-15px, 0.5625rem); } h4.header-display::before { height: 2.25rem; transform: translate(-15px, 0); margin-bottom: -0.5625rem; }
.icon { font-size: 20px; background-color: #212529; padding: 20px; } .icon { font-size: 20px; background-color: #212529; padding: 20px; }
.typography__headers__item { margin-bottom: 2rem; }
.typography__headers__item p { margin-bottom: 0.5rem !important; }
.alert { border-radius: 15px; } .alert { border-radius: 15px; }
.alert-custom { color: #3b4f87; background-color: #e2e6f0; border-color: #6679ac; } .alert-custom { color: #3b4f87; background-color: #e2e6f0; border-color: #6679ac; }
.alert-custom hr { border-top-color: #6679ac; } .alert-custom hr { border-top-color: #6679ac; }

19
_site/assets/styles/visuals.scss

@ -25,28 +25,32 @@
h1.header-display { h1.header-display {
&::before { &::before {
height: 3.75rem; // 150% of text-size height: 3.75rem; // 150% of text-size
transform: translate(-15px, 0.9375rem); // 25% of height transform: translate(-15px, 0);
margin-bottom: -0.937rem; // 25% of height
} }
} }
h2.header-display { h2.header-display {
&::before { &::before {
height: 3rem; height: 3rem;
transform: translate(-15px, 0.75rem); transform: translate(-15px, 0);
margin-bottom: -0.75rem;
} }
} }
h3.header-display { h3.header-display {
&::before { &::before {
height: 2.625rem; height: 2.625rem;
transform: translate(-15px, 0.65625rem); transform: translate(-15px, 0);
margin-bottom: -0.65625rem;
} }
} }
h4.header-display { h4.header-display {
&::before { &::before {
height: 2.25rem; height: 2.25rem;
transform: translate(-15px, 0.5625rem); transform: translate(-15px, 0);
margin-bottom: -0.5625rem;
} }
} }
@ -55,3 +59,10 @@ h4.header-display {
background-color: $oc-gray-9; background-color: $oc-gray-9;
padding: 20px; padding: 20px;
} }
.typography__headers__item {
margin-bottom: 2rem;
p {
margin-bottom: 0.5rem !important;
}
}

74
_site/visuals/index.html

@ -317,38 +317,48 @@
<p class="text-muted">Our main typography is Source Sans made by Adobe.</p> <p class="text-muted">Our main typography is Source Sans made by Adobe.</p>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12 typography__headers">
<p class="text-black small text-muted">H1 <div class="typography__headers__item">
<h1>Protect communications from monitoring</h1> <p class="text-black small text-muted">H1</p>
</p> <h1>Protect communications from monitoring</h1>
<p class="text-black small text-muted">H2 </div>
<h2>Protect communications from monitoring</h2> <div class="typography__headers__item">
</p> <p class="text-black small text-muted">H2</p>
<p class="text-black small text-muted">H3 <h2>Protect communications from monitoring</h2>
<h3>Protect communications from monitoring</h3> </div>
</p> <div class="typography__headers__item">
<p class="text-black small text-muted">H4 <p class="text-black small text-muted">H3</p>
<h4>Protect communications from monitoring</h4> <h3>Protect communications from monitoring</h3>
</p> </div>
<p class="text-black small text-muted">H5 <div class="typography__headers__item">
<h5>Protect communications from monitoring</h5> <p class="text-black small text-muted">H4</p>
</p> <h4>Protect communications from monitoring</h4>
<p class="text-black small text-muted">H6 </div>
<h6>Protect communications from monitoring</h6> <div class="typography__headers__item">
</p> <p class="text-black small text-muted">H5</p>
<h5>Protect communications from monitoring</h5>
<p class="text-black small pt-5 text-muted">H1 display </div>
<h1 class="header-display color-secondary">I2P Anonymous Network</h1> <div class="typography__headers__item">
</p> <p class="text-black small text-muted">H6</p>
<p class="text-black small text-muted">H2 display <h6>Protect communications from monitoring</h6>
<h2 class="header-display color-secondary">I2P Anonymous Network</h2> </div>
</p>
<p class="text-black small text-muted">H3 display <div class="typography__headers__item">
<h3 class="header-display color-secondary">I2P Anonymous Network</h3> <p class="text-black small pt-5 text-muted">H1 display</p>
</p> <h1 class="header-display color-secondary">I2P Anonymous Network</h1>
<p class="text-black small text-muted">H4 display </div>
<h4 class="header-display color-secondary">I2P Anonymous Network</h4> <div class="typography__headers__item">
</p> <p class="text-black small text-muted">H2 display</p>
<h2 class="header-display color-secondary">I2P Anonymous Network</h2>
</div>
<div class="typography__headers__item">
<p class="text-black small text-muted">H3 display</p>
<h3 class="header-display color-secondary">I2P Anonymous Network</h3>
</div>
<div class="typography__headers__item">
<p class="text-black small text-muted">H4 display</p>
<h4 class="header-display color-secondary">I2P Anonymous Network</h4>
</div>
</div> </div>
</div> </div>
<div class="row pt-5"> <div class="row pt-5">

19
assets/styles/visuals.scss

@ -25,28 +25,32 @@
h1.header-display { h1.header-display {
&::before { &::before {
height: 3.75rem; // 150% of text-size height: 3.75rem; // 150% of text-size
transform: translate(-15px, 0.9375rem); // 25% of height transform: translate(-15px, 0);
margin-bottom: -0.937rem; // 25% of height
} }
} }
h2.header-display { h2.header-display {
&::before { &::before {
height: 3rem; height: 3rem;
transform: translate(-15px, 0.75rem); transform: translate(-15px, 0);
margin-bottom: -0.75rem;
} }
} }
h3.header-display { h3.header-display {
&::before { &::before {
height: 2.625rem; height: 2.625rem;
transform: translate(-15px, 0.65625rem); transform: translate(-15px, 0);
margin-bottom: -0.65625rem;
} }
} }
h4.header-display { h4.header-display {
&::before { &::before {
height: 2.25rem; height: 2.25rem;
transform: translate(-15px, 0.5625rem); transform: translate(-15px, 0);
margin-bottom: -0.5625rem;
} }
} }
@ -55,3 +59,10 @@ h4.header-display {
background-color: $oc-gray-9; background-color: $oc-gray-9;
padding: 20px; padding: 20px;
} }
.typography__headers__item {
margin-bottom: 2rem;
p {
margin-bottom: 0.5rem !important;
}
}

Loading…
Cancel
Save