dotfiles

My PC Dotfiles & Website

_main.scss (3574B)


@import "variables";

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--color);
  font-family:
    "JetBrainsMono",
    Menlo,
    DejaVu Sans Mono,
    monospace;
  font-feature-settings: "liga";
  font-size: $font-size;
  line-height: 1.54;
  margin: 0;
  padding: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;

  @media (max-width: $phone-max-width) {
    font-size: 1rem;
  }
}

*,
*:after,
*:before {
  box-sizing: inherit;
}

.container {
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  max-width: calc(#{$tablet-max-width} - 2px);
  min-height: 100vh;
  padding: 30px;

  &.full,
  &.center {
    margin: 0 auto;
  }

  &.full {
    border: none;
    max-width: 100%;
  }

  &.center {
    border-left: 1px solid var(--border-color);
  }

  @media (max-width: calc(#{$tablet-max-width} - 2px)) {
    border: none;
  }

  @media (max-width: $phone-max-width) {
    padding: 20px;
  }
}

.content {
  display: flex;
  min-width: 0;
}

.skip-link {
  position: absolute;
  left: 20px;
  top: -100px;
  padding: 10px;
  background: var(--background);
  z-index: 200;

  &:focus {
    top: 10px;
  }
}

:focus-visible {
  outline: 2px dotted var(--accent-secondary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

h1 {
  font-size: 1.4rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.2rem;
}

h4,
h5,
h6 {
  font-size: 1.15rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;

  &:not(:first-child) {
    margin-top: 40px;
  }

  .zola-anchor {
    opacity: 0;
  }
}

.hidden {
  display: none;
}

hr {
  width: 100%;
  border: none;
  background: var(--border-color);
  height: 1px;
}

a {
  color: inherit;
  background: linear-gradient(
    to bottom,
    var(--accent-secondary-alpha-20) 0%,
    var(--accent-secondary-alpha-20) 100%
  );

  background-position: 0 100%;
  background-repeat: repeat-x;
  background-size: 0.5px 0.5px;
  transition: background-size 0.2s;

  &:hover {
    background-size: 4px 50px;
    color: var(--accent-alpha-70);
  }
}

p {
  margin-bottom: 20px;
}

ul,
ol {
  margin-left: 30px;
  padding: 0;

  li {
    position: relative;
    margin-top: 5px;
    margin-bottom: 5px;
  }

  @media (max-width: $phone-max-width) {
    margin-left: 20px;
  }

  ul,
  ol {
    margin-top: 10px;
    margin-bottom: 10px;
  }
}

ol ol {
  list-style-type: lower-alpha;
}

sup {
  color: var(--accent-secondary);
}

table {
  table-layout: fixed;
  border-collapse: collapse;
  width: 100%;
  margin: 40px 0;
}

th {
  color: var(--accent);
}

table,
th,
td {
  border: 1px dashed var(--accent);
  padding: 10px;
}

input {
  background: var(--background);
  border-color: var(--accent-secondary);
  color: var(--color);
  font-family: inherit;
  padding: 0.2rem;

  &[type="checkbox"] {
    appearance: none;
    display: inline-flex;
    vertical-align: bottom;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent-secondary);
    height: 1rem;
    width: 1rem;

    &:checked:after {
      content: "";
      background-color: var(--accent);
      height: 100%;
      width: 100%;
    }
  }
}

@media (max-width: $phone-max-width) {
  .katex-display {
    overflow: auto;
  }
}