JSFiddle - React, Tailwind, and code Playground

by Nikhil krishnan

HTML

<div class="box">text</div>

SCSS

* {
  margin: 0;
  padding: 0;
}

body {
  padding: 10vh;
}

.box {
  width: 50px;
  height: 50px;
  margin: auto;
  display: block;
  background-color: red;
  color: white; 
  font-size: 20px;
  border: solid 1px #ccc;
}

 @media (min-width: 768px) and (max-width: 991px) {
  .box {
    text-transform: uppercase;
  }
} 
@media (min-width: 768px) {

  //tab size
  .box {
    width: 100px; 
    height: 100px;
    color: black;
    background-color: white;
  }
}

@media (min-width: 992px) {

  //desktop small size
  .box {
    width: 200px;
    height: 200px;
    color: white;
    background-color: blue;
  }
}

@media (min-width: 1200px) {

  //desktop normal size
  .box {
    width: 500px;
    height: 500px;
    background-color: orange;
  }
}
@media (min-width: 1600px) {

  //desktop normal size
  .box {
    width: 500px;
    height: 500px;
    background-color: orange;
  }
}