Skip to content

Instantly share code, notes, and snippets.

@rikas
Created September 18, 2019 20:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rikas/765e0ea5729e3a6cc4ab9fd0e4a98ca4 to your computer and use it in GitHub Desktop.
Save rikas/765e0ea5729e3a6cc4ab9fd0e4a98ca4 to your computer and use it in GitHub Desktop.
React counter styles
.counter {
  padding: 50px;
  width: 200px;
  margin: auto;
  display: flex;
  align-items: center;
}
.counter button {
  font-size: 2em;
}
.count {
  font-size: 40px;
  text-align: center;
  flex-grow: 1;
  font-weight: bold;
}
@rikas
Copy link
Author

rikas commented Dec 11, 2019

Or the scss version:

.counter {
  padding: 50px;
  width: 200px;
  margin: auto;
  display: flex;
  align-items: center;

  button {
    font-size: 2em;
  }

  .count {
    font-size: 40px;
    text-align: center;
    flex-grow: 1;
    font-weight: bold;
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment