1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00
nerd-fonts/_includes/css/main.scss
Fini Jastrow a7810a53d0 Adapt scss to new icon sizes
[why]
The icon sizes (in EM) changed a bit, so we need to decrease the display
size to make the icon not-overlap the text.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-12-16 19:42:10 +01:00

290 lines
5.8 KiB
SCSS

html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }
/* ---------------------------*/
/* ----- Special Styles ----- */
/* ---------------------------*/
/* ----- colors (autogenerated from _config.yml)----- */
{% for c in site.colors %}
.border-{{c[0]}} { border-color: {{ c[1] }} !important; }
.text-{{c[0]}} { color: {{ c[1] }}; }
.text-{{c[0]}} a { color: {{ c[1] }}; }
.bg-{{c[0]}} { background-color: {{ c[1] }} !important; }
{% endfor %}
/* ----- per-post colors! ----- */
{% for node in site.posts %}
{% capture id %}{{ node.id | remove:'/' | downcase }}{% endcapture %}
{% capture bg %}{% if site.colors[node.bg] %}{{ site.colors[node.bg] }}{% else %}{{ node.bg }}{% endif %}{% endcapture %}
{% capture fg %}{% if site.colors[node.color] %}{{ site.colors[node.color] }}{% else %}{{ node.color }}{% endif %}{% endcapture %}
nav .p-{{id}} { border-color: {{ bg }}; }
#{{id}} { background-color: {{ bg }} !important; color: {{ fg }}; }
#{{id}} a { color: {{ fg }}; }
#{{id}} .sectiondivider { color: {{ bg }}; }
{% endfor %}
/* ----- code, syntax highlighting, etc ----- */
code, pre { font-family: Monaco, Menlo, Consolas, "Courier New", monospace; }
/* spesifically inline code */
code, pre {
background: rgba(255,255,255,0.2);
display: inline;
word-wrap: break-word;
}
/* block code */
pre code { background: none; display: block; }
pre {
display: block;
margin: 20px 5%;
padding: 4px 8px;
background: rgba(255,255,255,0.1);
word-wrap: break-word;
}
.highlight { margin:20px 5%; }
/* ----- base elements ----- */
img {
max-width:100%!important;
height:auto;
vertical-align:middle;
}
hr {
margin:60px auto;
width:50%;
border-color: {{ site.colors.black }};
}
.container { word-wrap: break-word; }
.center { text-align: center; }
.left, .container .left { text-align: left; }
.right, .container .right { text-align: right; }
.container h1 {
margin-top: 10px;
}
.container h1, .container h2, .container h3, .container h4 {
margin-bottom: 20px;
text-align: center;
padding: 0 4%;
}
.container p, .container ol, .container ul {
font-size: 17px;
padding: 0 5%;
}
.container ol, .container ul { padding: 0 8%; }
.container p:first-of-type {
margin-top: 10px;
}
/* keep embedded videos fluid! */
.icontain {
position: relative;
height: 0;
overflow: hidden;
padding-bottom: 56.25%; /* keep 16x9 Aspect Ratio */
}
.i4x3 { padding-bottom: 75.00%; } /* keep 4x3 Aspect Ratio */
.icontain iframe {
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
}
.inlineblock {
display:-moz-inline-stack;
display:inline-block;
zoom:1;
}
/* ---------------------------*/
/* ----- Main Structure ----- */
/* ---------------------------*/
/* ----- top menu ----- */
{% assign navborder = 5 %}
{% assign navborder_active = 10 %}
nav {
font-size:15px;
width:100%;
position:fixed;
z-index:98;
top:0;
left:0;
background:#2e2e2e;
}
nav ul {
list-style:none;
text-align:center;
padding:0;
margin:0;
letter-spacing:-4px;
}
nav ul li {
display:inline-block;
border-top:{{navborder}}px solid;
padding: {{navborder}}px;
*display:inline;
zoom:1;
line-height:normal;
letter-spacing:normal;
text-transform:uppercase;
min-width:110px;
line-height:60px;
margin:0;
}
nav ul li a, nav ul li a:visited {
display:block;
color:#fff;
text-decoration:none;
font-weight:600;
opacity:.75;
}
nav ul li a:hover {
opacity:1
}
nav ul li:hover, nav ul li.active {
border-top-width: {{navborder_active}}px;
padding-top: 0;
}
/* ----- sections/articles ----- */
.section {
position:relative;
display:block;
width:100%;
min-height:300px;
padding:130px 0;
background:url(/assets/img/bgnoise.png);
/* generated noise from noisetexturegenerator.com */
}
.section:first-of-type {
padding-top: 90px;
}
#footer {
padding: 8px 0;
min-height:0;
text-align:center;
background-color:#2e2e2e;
background-image:none;
}
#footer .container p { font-size:13px; margin:0; }
.subtlecircle {
text-align:center;
z-index:3;
border-radius:50%;
-moz-border-radius:50%;
-webkit-border-radius:50%;
box-shadow: 0px 1px 15px rgba(0,0,0,0.05);
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAF0lEQVQIHWP8//+/MQMaYELjg7kUCgIASm8DOqGzfp8AAAAASUVORK5CYII=);
}
.sectiondivider {
width:270px;
height:270px;
padding:15px;
position:absolute;
top:-135px;
left:50%;
margin-left:-135px;
}
.sectiondivider .fa-stack {
font-size: 120px;
position: static;
}
.sectiondivider .nf-fa-circle { color: #fff; }
.sectiondivider h5 {
font-size:15px;
font-weight:700;
text-transform:uppercase;
position:absolute;
bottom:50px;
left:auto;
text-align:center;
display:block;
z-index:6;
width:240px;
}
.sectiondivider.imaged {
text-shadow: 1px 1px 3px #333;
}
#features .sectioninner {
position: relative;
}
#features .sectioninner .nf {
font-size: 1.5em;
}
#features .sectioninner1 {
top:-2em;
left:5em;
}
#features .sectioninner2 {
top:1em;
left:4em;
line-height: 2em;
word-spacing: .5em;
}
#features .sectioninner img,
#features .sectioninner div {
border-radius: 50%;
margin-top:0px;
}
#features .sectioninner2 div {
/*background: url('/img/preview2.png');*/
/*background-position: -50% 101%;*/
/*background-color: {{ site.colors.black }};*/
background-color: #2e2e2e;
font-weight: bold;
padding-top: .75em;
}
.columned {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
-webkit-column-gap: 40px;
-moz-column-gap: 40px;
column-gap: 40px;
-webkit-column-rule: 1px outset rgba(255,255,255,0.5);
-moz-column-rule: 1px outset rgba(255,255,255,0.5);
column-rule: 1px outset rgba(255,255,255,0.5);
}
.longlist { font-size: 14px !important; }
.longlist li { margin-bottom: 3px; }