veto

Simple Sinatra voting website.
git clone git://git.knutsen.co/veto
Log | Files | Refs | README | LICENSE

styles.css (6131B)


@import url('https://fonts.googleapis.com/css?family=Rubik:400,400i,500');
@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');

:root {
  --fallback-sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --head-font: 'Rubik', var(--fallback-sans);
  --body-font: 'Inter', var(--fallback-sans);
  --mono-font: monospace;
  /* Colours for light theme. */
  --bg: #fff;
  --fg: #000;
  --bg-rgb: 255, 255, 255;
  --fg-rgb: 000, 000, 000;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Colours for dark theme */
    --bg: #090909;
    --fg: #fff;
    --bg-rgb: 009, 009, 009;
    --fg-rgb: 255, 255, 255;
  }

  .github {
    filter: invert(1);
  }
}

html, body {
  margin: 0;
  padding: 0;
  font-size: 16px;
  min-height: 100vh;
  font-family: var(--body-font);
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
}

html {
  overflow-y: scroll;
}

.container {
  margin-top: 30px;
}

ul {
  padding-left: 40px;
  margin: 10px 0;
}

.github {
  opacity: 0.6;
  transition: all .15s ease;
  margin: 0 1em;
}
.github:hover {
  opacity: 1;
}
.github img {
  cursor: pointer;
  display: inline-block;
  height: 1.2em;
  vertical-align: middle;
  vertical-align: -webkit-baseline-middle;
}
#options {
  margin: 20px 0;
}

#options li {
  padding: 5px 10px;
  margin-top: 20px;
  border-radius: 5px;
  background: var(--fg);
  color: var(--bg);
  transition: all .1s ease;
  cursor: pointer;
  vertical-align: middle;
  opacity: 0.8;
}

#options li input {
  background: var(--fg);
  color: var(--bg);
  border-bottom: 2px solid rgba(var(--bg-rgb), 0.2);
  padding: 0 5px;
  margin: 0;
  display: inline-block;
  height: 1.6em;
  line-height: 0px;
  margin: 0;
}

#options li:hover {
  opacity: 1;
  background: var(--fg);
}

.dark-option {
  background: var(--fg) !important;
  color: var(--bg);
}

#options li span {
  vertical-align: middle;
  border-bottom: 2px solid transparent;
}

#options li .symbols {
  vertical-align: middle;
  float: right;
  font-size: 0.8em;
}

#options li .symbols i {
  margin: 0 0 0 3px;
  padding: 7px;
  vertical-align: middle;
  transition: all .15s ease;
}

#options li .symbols i:hover {
  color: #999;
}

label {
  font-weight: normal;
}

input[type=submit] {
  font-weight: normal;
  border-color: rgba(var(--fg-bg), 0.1);
  color: var(--bg);
  background: var(--fg);
  transition: all .1s ease;
}

input[type=submit]:hover {
  background: rgba(var(--fg-rgb), 0.1);
  color: rgba(var(--fg-rgb), 0.6);
}

input[type=submit]:active {
  background: rgba(var(--fg-rgb), 0.5);
}

input[type=button], button {
  padding: 0;
  margin: 0 15px;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(var(--fg-rgb), 0.1);
  height: 36px;
  letter-spacing: normal;
  font-weight: normal;
}

input[type=text] {
  background: transparent;
  color: var(--fg);
  font-size: 1em;
  padding: 0;
  border: none;
  border-radius: 0px;
  border-bottom: 1px solid rgba(var(--fg-rgb), 0.1);
  transition: all .15s ease;
}

input[type=text]:focus {
  outline: none;
  border: none;
  border-bottom: 1px solid rgba(var(--fg-rgb), 0.1);
}

input[type=checkbox] { display:none; }
input[type=checkbox] + label:before {
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  font-size: 1.3em;
  vertical-align: middle;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

input[type=checkbox] + label:before {
  font-family: Font Awesome\ 5 Free;
  letter-spacing: 10px;
  content: '\f0c8';
}

input[type=checkbox]:checked + label:before {
  font-family: Font Awesome\ 5 Free;
  letter-spacing: 10px;
  content: '\f14a';
}

#code {
  font-family: var(--mono-font);
  color: rgba(var(--fg-rgb), 0.6);
}

.problem:focus {
  outline: none;
  border: 1px solid #900;
  background: #ffd8d2;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--head-font);
  font-weight: 500;
  color: var(--fg);
}

h3 {
  font-size: 1.57em;
}

.in {
  margin-left: 0;
  margin-top: -6px;
}

.in input {
  width: 100%;
}

#addition {
  margin-left: 32px;
}

.right {
  text-align: right;
}

footer {
  margin-top: 2em;
  border-top: 1px solid rgb(var(--fg-rgb), 0.1);
  display: flex;
  align-items: center;
  height: 4em;
  user-select: none;
}
footer .container {
  padding-top: 0;
  margin-top: 0;
}
footer .row {
  display: flex;
  align-items: center;
  justify-content: unset;
}
footer .row .left {
  margin-right: auto;
}
footer span {
  font-weight: bold;
  font-size: 2em;
  vertical-align: middle;
  margin-right: 1em;
}
.home {
  padding: 10px 20px;
  cursor: pointer;
  color: var(--bg);
  text-transform: uppercase;
  font-size: 11px;
  background: var(--fg);
  border-radius: 4px;
  float: right
}

.url {
  font-family: var(--mono-font);
  word-break: break-all;
  display: block;
  font-size: 1em;
  color: rgba(var(--fg-rgb), 0.6);
}

.voting-options {
  border-left-width: 0.5em;
  border-left-style: solid;
  border-image: linear-gradient(to bottom,
    rgba(var(--fg-rgb), 0.20)  0%,
    rgba(var(--fg-rgb), 0.14) 11%,
    rgba(var(--fg-rgb), 0.12) 28%,
    rgba(var(--fg-rgb), 0.10) 43%,
    rgba(var(--fg-rgb), 0.06) 57%,
    rgba(var(--fg-rgb), 0.03) 75%,
    rgba(var(--fg-rgb), 0.01) 90%,
    rgba(var(--fg-rgb), 0.00) 100%) 1 100%;
  padding-left: 1em;
}

.issues {
  position: fixed;
  right: 15px; /* Scroll bar */
  bottom: 0;
  overflow: hidden;
}

.issues div > * {
  padding: 10px 15px;
  margin: 0;
}

.issues div {
  max-height: 0;
  width: 15em;
  opacity: 0;
  margin: 10px;
  border-radius: 5px;
  border-left: 8px solid;
  transition: all .4s ease-out;
  overflow: hidden;
}

.issues p {
  font-size: 0.8em;
  width: auto;
  border-top:    2px solid;
  border-bottom: 2px solid;
}

.issues h3 {
  color: inherit;
}

.issues .show {
  max-height: 300px;
  opacity: 1;
}

.issues .error {
  background: #ffc8b3;
  border-color: #ff5436;
  color: #800 !important;
}

.issues .error p {
  background: #ffd8d2;
  border-color: #faa;
}

.issues .warning {
  background: #ffeab3;
  border-color: #ffc136;
  color: #885a00 !important;
}

.issues .warning p {
  background: #fff0d2;
  border-color: #ffe2aa;
}