cellular-automaton 0.1.10

A cellular automaton simulation library with support for WebAssembly.
Documentation
@use './variables/breakpoint';
@use './variables/color';
@use './variables/font';

@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: normal;
  src: url('../fonts/press-start-2p-v8-latin-regular.eot');
  src: local('Press Start 2P Regular'), local('PressStart2P-Regular'),
    url('../fonts/press-start-2p-v8-latin-regular.eot?#iefix') format('embedded-opentype'),
    url('../fonts/press-start-2p-v8-latin-regular.woff2') format('woff2'),
    url('../fonts/press-start-2p-v8-latin-regular.woff') format('woff'),
    url('../fonts/press-start-2p-v8-latin-regular.ttf') format('truetype'),
    url('../fonts/press-start-2p-v8-latin-regular.svg#PressStart2P') format('svg');
}

html,
body {
  height: 100%;
}

html {
  background-color: color.$bg;
  color: color.$fg;
}

body {
  position: relative;
  font-family: font.$ps2p;
  font-size: 12px;
}

input,
select {
  &:focus {
    outline: none;
  }
}

.golem-heading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.golem-heading {
  font-size: 1.25rem;
  margin: 0.5rem 5px 0 5px;
  border-top: 2px solid color.$fg;
  border-right: 2px solid color.$fg;
  border-left: 2px solid color.$fg;
  padding: 0.75rem;

  @media screen and (min-width: breakpoint.$sm) {
    font-size: 1.5rem;
  }

  @media screen and (min-width: breakpoint.$md) {
    font-size: 2rem;
  }
}

.golem-subheading {
  font-size: 1rem;
  margin: 0;
  border: 2px solid color.$fg;
  padding: 0.75rem;

  @media screen and (min-width: breakpoint.$sm) {
    font-size: 1.25rem;
  }

  @media screen and (min-width: breakpoint.$md) {
    font-size: 1.5rem;
  }
}

.golem-link-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.golem-link {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid color.$fg;
  padding: 0.75rem;
  background-color: color.$bg;
  color: color.$fg;
  text-align: center;
  text-decoration: none;

  &:hover:not(:disabled) {
    background-color: color.$hover;
    cursor: pointer;
  }

  &:active {
    border: 2px solid color.$active;
  }

  @media screen and (min-width: breakpoint.$sm) {
    position: unset;
    transform: unset;
    font-size: 1.25rem;
  }
}

.golem-stage-fallback {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  border: 2px solid color.$fg;
}

.golem-stage {
  display: block;
  margin: 0 auto;
  border: 2px solid color.$fg;
}

.golem-control {
  max-width: breakpoint.$lg;
  margin: 0 auto;
  padding: 0 3rem;
}

.golem-stats {
  display: grid;
  margin-bottom: 1rem;
  border-right: 2px solid color.$fg;
  border-bottom: 2px solid color.$fg;
  border-left: 2px solid color.$fg;
  padding: 0.5rem 1.25rem;

  span:not(:last-child) {
    margin-bottom: 0.5rem;

    @media screen and (min-width: breakpoint.$sm) {
      margin-bottom: unset;
    }
  }

  @media screen and (min-width: breakpoint.$sm) {
    grid-template-columns: repeat(2, 50%);
  }

  @media screen and (min-width: breakpoint.$lg) {
    text-align: center;
  }
}

.golem-options {
  display: grid;
  grid-template-columns: repeat(2, 50%);
  align-content: center;
  row-gap: 1rem;
  margin-bottom: 1rem;
}

.golem-options-buttons {
  grid-column-start: span 2;
  display: grid;
  grid-template-columns: repeat(2, calc(50% - 0.5rem));
  row-gap: 1rem;
  column-gap: 1rem;

  @media screen and (min-width: breakpoint.$sm) {
    grid-template-columns: repeat(4, calc(25% - 0.75rem));
  }
}

.golem-input-button {
  border: 2px solid color.$fg;
  padding: 0.5rem;
  background-color: color.$bg;
  color: color.$fg;

  &:hover:not(:disabled) {
    background-color: color.$hover;
    cursor: pointer;
  }

  &:active {
    border: 2px solid color.$active;
  }

  &:disabled {
    color: color.$disabled;
    border: 2px solid color.$disabled;
  }
}

.golem-options-label {
  grid-column-start: span 2;
  display: grid;
  grid-template-rows: 1fr;

  @media screen and (min-width: breakpoint.$sm) {
    grid-template-columns: repeat(2, 50%);
  }

  @media screen and (min-width: breakpoint.$lg) {
    grid-column-start: unset;

    &:nth-child(even) {
      margin-right: 0.5rem;
    }

    &:nth-child(odd) {
      margin-left: 0.5rem;
    }
  }
}

.golem-options-label-text {
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 2px solid color.$fg;
  border-right: 2px solid color.$fg;
  border-left: 2px solid color.$fg;
  padding: 0.5rem;

  @media screen and (min-width: breakpoint.$sm) {
    border-right: unset;
    border-bottom: 2px solid color.$fg;
  }
}

.golem-input-select {
  border: none;
  padding: 0.5rem;
}

.golem-input-text {
  border: none;
  padding: 0.5rem;
}

.golem-input-text-invalid {
  border-right: 1rem solid color.$invalid;
}