Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="container">
      <div class="chutney-container">
        <div class="chutney-green"></div>
        <div class="chutney-red"></div>
      </div>
      <div class="plate">
        <div class="stick">
          <div class="paneer"></div>
          <div class="capsicum"></div>
          <div class="paneer"></div>
          <div class="tomato"></div>
          <div class="paneer"></div>
          <div class="onion"></div>
          <div class="paneer"></div>
          <div class="tomato"></div>
          <div class="onion"></div>
          <div class="paneer"></div>
        </div>
        <div class="chutney-spread-red"></div>
        <div class="chutney-spread-green"></div>
      </div>
    </div>
              
            
!

CSS

              
                :root {
  --bg-clr: #343434;

  --plate-clr: hsl(0, 0%, 96%);
  --plate-border-clr: hsl(0, 0%, 89%);
  --plate-border-clr-50: hsl(0, 0%, 89%, 0.5);
  --plate-size: 72vmin;

  --stick-clr: hsl(0, 59%, 41%);

  /* --paneer-clr-primary: #fcc203; */
  --paneer-clr-primary: hsl(40, 100%, 95%);
  --paneer-clr-secondary: #fcc203;
  --paneer-clr-tertiary: #e68210;
  /* --paneer-clr-secondary: hsl(75, 100%, 98%); */
  --paneer-width: 20vmin;

  --onion-clr: #8a1422;
  --capsicum-clr: #2e7d32;
  --tomato-clr: #d32f2f;

  --chutney-green-clr: hsl(123, 62%, 39%);
  --chutney-red-clr: #f44336;

  --transition-time: 300ms;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-clr);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.container {
  display: flex;
  position: relative;
}

.plate {
  background-color: var(--plate-clr);
  border: 1vmin solid var(--plate-border-clr);
  width: var(--plate-size);
  border-radius: 50% 2vmin;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
  box-shadow: 1.5vmin 1.5vmin 2vmin black;
}

.plate::after {
  content: "";
  display: block;
  position: absolute;
  border-radius: 50% 1.25vmin;
  border: 2px solid var(--plate-border-clr);
  inset: 1rem;
}

.plate::before {
  content: "";
  display: block;
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--plate-border-clr);
  background-color: var(--plate-border-clr-50);
  inset: 17vmin;
  z-index: 5;
}

.stick {
  background-color: var(--stick-clr);
  position: absolute;
  width: 0.5vmin;
  height: calc(var(--plate-size) / 1.1);
  z-index: 10;
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
  padding-block: 5vmin 1.5vmin;
  align-items: center;
  rotate: -135deg;
  border-radius: 100vh 100vh 0 0;
  transition: transform var(--transition-time) ease-in-out;
}

.plate:hover > .stick {
  transform: rotate(-180deg);
}

.plate:hover > .stick > *:not(.capsicum) {
  opacity: 0;
}

.plate:hover > .stick > .capsicum {
  transform: translateX(15vmin) translateY(-5vmin) rotate(-25deg);
}

.plate:hover > .stick ~ .chutney-spread-green,
.plate:hover > .stick ~ .chutney-spread-red {
  opacity: 0;
}

.container:has(.plate:hover) > .chutney-container > .chutney-red,
.container:has(.plate:hover) > .chutney-container > .chutney-green {
  background-color: var(--plate-clr);
}

.paneer,
.tomato,
.onion,
.capsicum {
  position: relative;
  background-color: red;
  width: var(--paneer-width);
  height: calc(var(--paneer-width) / 2);
  transition: transform var(--transition-time) ease-in-out;
}

.tomato,
.onion,
.capsicum {
  transform: scaleY(1.1);
  z-index: 1;
}

.paneer {
  background-color: var(--paneer-clr-primary);
  border-radius: 1.5vmin;
  border-top: 2px solid rgba(165, 42, 42, 0.576);
  box-shadow: inset 0 -1vmin rgba(218, 165, 32, 0.299);
  outline: 1vmin solid rgba(218, 165, 32, 0.031);
  height: var(--paneer-width);
  box-shadow: inset 1vmin -1vmin 1vmin var(--paneer-clr-tertiary),
    inset -1vmin 1vmin 2vmin var(--paneer-clr-tertiary),
    inset 4vmin -4vmin 1vmin var(--paneer-clr-secondary),
    inset -4vmin 4vmin 4vmin var(--paneer-clr-secondary);
}

.stick:nth-child(2) > .paneer {
  background-color: red;
  scale: 6;
}

.onion {
  background-color: var(--onion-clr);
  width: calc(var(--paneer-width) + 2vmin);
  border-radius: 0 0 100vh 100vh;
  box-shadow: inset 2px -2px 2px rgba(0, 0, 0, 0.402),
    inset -2px -2px rgba(0, 0, 0, 0.402);
}

.capsicum {
  background-color: var(--capsicum-clr);
  width: calc(var(--paneer-width) + 2vmin);
  border-radius: 0 0 50% 50%;
  display: flex;
  justify-content: center;
}

.capsicum::after {
  content: "";
  position: absolute;
  background-color: hsl(123, 62%, 39%);
  border-radius: 0 0 50% 50%;
  width: 75%;
  height: 25%;
}

.tomato {
  background-color: var(--tomato-clr);
  border-radius: 0 0 100vh 100vh;
  width: calc(var(--paneer-width) - 2vmin);
  box-shadow: inset 0.5vmin 0.5vmin firebrick, inset -0.5vmin 0.5vmin firebrick,
    0 0 0.5vmin firebrick;
  height: calc(var(--paneer-width) / 4);
}

.chutney-container {
  position: absolute;
  gap: 1vmin;
  rotate: -45deg;
  top: -10vmin;
  display: flex;
}

.chutney-green,
.chutney-red {
  transform: translate(-50%, -50%);
  border: 1vmin solid var(--plate-border-clr);
  width: 15vmin;
  aspect-ratio: 1;
  rotate: -20deg;
  border-radius: 50%;
  box-shadow: 1vmin 1vmin 1.5vmin black;
  transition: background-color var(--transition-time) ease-in-out;
}

.chutney-green {
  background-color: var(--chutney-green-clr);
}

.chutney-red {
  background-color: var(--chutney-red-clr);
}

.chutney-spread-green,
.chutney-spread-red {
  position: absolute;
  border-radius: 50%;
  transition-property: opacity;
  transition-duration: var(--transition-time);
  transition-timing-function: ease-in-out;
}

.chutney-spread-green {
  width: calc(var(--plate-size) / 1.25);
  height: calc(var(--plate-size) / 1.25);
  background-color: var(--chutney-green-clr);
}

.chutney-spread-green::after,
.chutney-spread-red::after {
  content: "";
  display: block;
  position: absolute;
  inset: -0.5vmin;
  transform: translate(1.15vmin, 1.25vmin);
  background-color: var(--plate-clr);
  border-radius: 50%;
}

.chutney-spread-red {
  width: calc(var(--plate-size) / 1.35);
  height: calc(var(--plate-size) / 1.35);
  background-color: var(--chutney-red-clr);
  z-index: 2;
}

              
            
!

JS

              
                
              
            
!
999px

Console