Warning: unlink(./data/secure/tokens/050175ade3f81b3b5f83121e352152b4a86a5e669ae3d5d9fd601df25e9f5094b49ca10b2ab244e2a078b7c619bea6961388a2554760967f9f999af7bdac434e.token): No such file or directory in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 865

Warning: unlink(./data/secure/tokens/0746e7c4b29ddd64614da77dba8db9e577f28f31d4c6ff0a6aeb112bfdb7e5d9ffed8337b47733e662c2cdc9ba239c11000273d644f559cb22dd8906f98f4050.token): No such file or directory in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 865

Warning: unlink(./data/secure/tokens/07d9350785a592e2a7c670df7d583230852d50ddbcd622cb993ccb3649b2bb13a3110a15de71a1e645a8dcb28c921ee359984cdc39dd4cbccdeb094729227b00.token): No such file or directory in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 865

Warning: unlink(./data/secure/tokens/0eea086651bc4f511104400d3a599b1e703ce1e40f283c8e7a4f1c0f47628626ecc34b941dd2a4105348ac6887d137413513daf734ed86082d9b922e004fb487.token): No such file or directory in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 865

Warning: unlink(./data/secure/tokens/1f4fe87363752a2e372302a5e0c6d64737e677a11cfc780eb85a6cebb33a8b312d3cae21d0216d8a599041970dfd9c5c4145377885431a5ed7f47e68a724252d.token): No such file or directory in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 865

Warning: unlink(./data/secure/tokens/2ee997c478c244dd8eecf8b551aacf13cb5157036d467978e5b969eab5c614d09d166d5662ca3af68f54fbf58e42bb333e9c5fb6d4bbd7fe43433e65a88937aa.token): No such file or directory in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 865

Warning: unlink(./data/secure/tokens/326cf29e33c2f3e937d7b4d3303c00a3d665d40551df0662e0a0ac8455aa19a11732a493d6730f715b8aa8a1592ca3f9fe3135e2dee9bf3f8e0c18fae8d558c9.token): No such file or directory in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 865

Warning: unlink(./data/secure/tokens/ab4ff60e12df057905fac2f826ea648359107f352d50e292bbc89d3e60bf74fe4c1a3aef2f18d837b2ae30fb594487c747617c7286918b03d66e387e2b0804e7.token): No such file or directory in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 865

Warning: filemtime(): stat failed for ./data/secure/tokens/b7b7a02a6cbb03d2e98cab19ec99bbf1359ed629dc6ff186877e3f0533dedfc93ad3f29c60cd9259df665abf87fd7ff28f7bbb922f4abb8ed3ae7f0f631bed0b.token in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 831

Warning: filemtime(): stat failed for ./data/secure/tokens/cbafd9af4ad5ba9e8346a2edcd1002f41ada53ab3f1957afe08f7df2d80229af402519e37125b7af7c8df6a90500bdb1bbf37140cf4e5dcac1a11e668732a8dd.token in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 831

Warning: filemtime(): stat failed for ./data/secure/tokens/d44d0515a685622435310b0a7de27271eada0e51927247f28e8039a91e5228433689f5e330f0f335715848dcefc44318b8cde32631aafb3b0afed55b704ee8c7.token in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 831

Warning: filemtime(): stat failed for ./data/secure/tokens/def0de061b9ce0d1ab53728e059f4f43462d6c223b0f97c5e0a27776a1d1c997c3b578a040e2f54274039d2f5a7734eb2bc7613cc6366e3d058a4e57f25b9901.token in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 831

Warning: filemtime(): stat failed for ./data/secure/tokens/e12a64076ff6771600a0de83dee50aa6ec30d198fcd13dd1ed1be48874a304540cf17f7a68096eab6ec7595effd9e7c544d9a869867df2a6c278b2f2c813eded.token in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 831

Warning: filemtime(): stat failed for ./data/secure/tokens/f56808197655bab3c309c208049306714119799d0be54f5ab16d556d87560d8be88cacf476e4286ff0a1d3195ac677cf1a1319dbcaa12508bd8535fb117773c7.token in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 831

Warning: filemtime(): stat failed for ./data/secure/tokens/ffbaba32e996a2c7f010cf6a8e6058df49b1729bbab0bcd3e2469bdefeeef33ee41d08e18d8b7eab4ad733cc25124a80d78bb236eb8bf3c7638bf878b4b4cc34.token in /home/sigesthaxo/snippetvamp/assets/php/class/Helium_secure_class.php on line 831
SnippetVamp - open
#key - Building a Morphing Hamburger Menu with CSS | Scotch
/* The MARKUP


*/
/* Basic styles */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
}

body {
  font-family: sans-serif;
  background-color: #F6C390;
}

a {
  text-decoration: none;
}

.container {
  position: relative;
  margin: 35px auto 0;
  width: 300px;
  height: 534px;
  background-color: #533557;
  overflow: hidden;
}

/* To hide the checkbox */
#toggle {
  display: none;
}

/* Styles for the 'open' state, if the checkbox is checked */
#toggle:checked {
/* Any element you need to change the style if menu is open goes here, using the sibling selector (~) as follows*/

 /* Styles for the open navigation menu, for example */
  & ~ .nav {
  }
}

$transition-duration: 0.5s;

/* Showing nav items as lines, making up the hamburger menu icon */
.nav-item {
  position: relative;
  display: inline-block;
  float: left;
  clear: both;
  color: transparent;
  font-size: 14px;
  letter-spacing: -6.2px;
  height: 7px;
  line-height: 7px;
  text-transform: uppercase;
  white-space: nowrap;
  transform: scaleY(0.2);
  transition: $transition-duration, opacity 1s;

  /* Adjusting width for the first line */
  &:nth-child(1) {
    letter-spacing: -8px;
  }

  /* Adjusting width for the second line */
  &:nth-child(2) {
    letter-spacing: -7px;
  }

  /* Adjusting from the fourth element onwards */
  &:nth-child(n + 4) {
    letter-spacing: -8px;
    margin-top: -7px;
    opacity: 0;
  }

  /* Getting the lines for the hamburger menu icon */
  &:before {
    position: absolute;
    content: '';
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #EC7263;
    transform: translateY(-50%) scaleY(5);
    transition: $transition-duration;
  }
}

$transition-duration: 0.5s;

#toggle:checked {

  /* Open nav */
  & ~ .nav {

    // Restoring nav items from "lines" in the menu icon
    .nav-item {
      color: #EC7263;
      letter-spacing: 0;
      height: 40px;
      line-height: 40px;
      margin-top: 0;
      opacity: 1;
      transform: scaleY(1);
      transition: $transition-duration, opacity 0.1s;

      // Hiding the lines
      &:before {
        opacity: 0;
      }
    }
  }
}

:nth-child

transition-delay

$items: 4;
$transition-delay: 0.05s;

.nav-item {

  /* Setting delays for the nav items in close transition */
  @for $i from 1 through $items {
    &:nth-child(#{$i}) {
      $delay: ($i - 1) * $transition-delay;
      transition-delay: $delay;
      &:before {
        transition-delay: $delay;
      }
    }
  }
}

$delay

$delay: ($items - $i) * $transition-delay;


/* CSS FINAL */
/* Basic styles */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
}

body {
  font-family: sans-serif;
  background-color: #F6C390;
}

a {
  text-decoration: none;
}

.container {
  position: relative;
  margin: 35px auto 0;
  width: 300px;
  height: 534px;
  background-color: #533557;
  overflow: hidden;
}

/* Toggle functionality */
#toggle {
  display: none;
}

#toggle:checked ~ .toggle-container .button-toggle {
  box-shadow: 0 0 0 550px rgba(0, 0, 0, 0.1), inset 0 0 0 20px rgba(0, 0, 0, 0.1);
}
#toggle:checked ~ .toggle-container .button-toggle:before {
  transform: translateY(-50%) rotate(45deg) scale(1);
}
#toggle:checked ~ .toggle-container .button-toggle:after {
  transform: translateY(-50%) rotate(-45deg) scale(1);
}
#toggle:checked ~ .nav {
  margin-bottom: 100px;
  pointer-events: auto;
  transform: translate(50px, 50px);
}
#toggle:checked ~ .nav .nav-item {
  color: #EC7263;
  letter-spacing: 0;
  height: 40px;
  line-height: 40px;
  margin-top: 0;
  opacity: 1;
  transform: scaleY(1);
  transition: 0.5s, opacity 0.1s;
}
#toggle:checked ~ .nav .nav-item:nth-child(1) {
  transition-delay: 0.15s;
}
#toggle:checked ~ .nav .nav-item:nth-child(1):before {
  transition-delay: 0.15s;
}
#toggle:checked ~ .nav .nav-item:nth-child(2) {
  transition-delay: 0.1s;
}
#toggle:checked ~ .nav .nav-item:nth-child(2):before {
  transition-delay: 0.1s;
}
#toggle:checked ~ .nav .nav-item:nth-child(3) {
  transition-delay: 0.05s;
}
#toggle:checked ~ .nav .nav-item:nth-child(3):before {
  transition-delay: 0.05s;
}
#toggle:checked ~ .nav .nav-item:nth-child(4) {
  transition-delay: 0s;
}
#toggle:checked ~ .nav .nav-item:nth-child(4):before {
  transition-delay: 0s;
}
#toggle:checked ~ .nav .nav-item:before {
  opacity: 0;
}
#toggle:checked ~ .dummy-content {
  padding-top: 30px;
}
#toggle:checked ~ .dummy-content:before {
  background-color: rgba(0, 0, 0, 0.3);
}

/* Toggle button */
.button-toggle {
  position: absolute;
  display: inline-block;
  width: 20px;
  height: 20px;
  margin: 25px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  border-radius: 100%;
  transition: 0.6s;
}
.button-toggle:hover {
  box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.1), inset 0 0 0 20px rgba(0, 0, 0, 0.1);
}
.button-toggle:before, .button-toggle:after {
  position: absolute;
  content: '';
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #EC7263;
  border-radius: 5px;
  transition: 0.5s;
}
.button-toggle:before {
  transform: translateY(-50%) rotate(45deg) scale(0);
}
.button-toggle:after {
  transform: translateY(-50%) rotate(-45deg) scale(0);
}

/* Menu */
.nav {
  display: inline-block;
  margin: 25px 25px 20px;
  pointer-events: none;
  transition: 0.5s;
}

.nav-item {
  position: relative;
  display: inline-block;
  float: left;
  clear: both;
  color: transparent;
  font-size: 14px;
  letter-spacing: -6.2px;
  height: 7px;
  line-height: 7px;
  text-transform: uppercase;
  white-space: nowrap;
  transform: scaleY(0.2);
  transition: 0.5s, opacity 1s;
}
.nav-item:nth-child(1) {
  transition-delay: 0s;
}
.nav-item:nth-child(1):before {
  transition-delay: 0s;
}
.nav-item:nth-child(2) {
  transition-delay: 0.05s;
}
.nav-item:nth-child(2):before {
  transition-delay: 0.05s;
}
.nav-item:nth-child(3) {
  transition-delay: 0.1s;
}
.nav-item:nth-child(3):before {
  transition-delay: 0.1s;
}
.nav-item:nth-child(4) {
  transition-delay: 0.15s;
}
.nav-item:nth-child(4):before {
  transition-delay: 0.15s;
}
.nav-item:nth-child(1) {
  letter-spacing: -8px;
}
.nav-item:nth-child(2) {
  letter-spacing: -7px;
}
.nav-item:nth-child(n + 4) {
  letter-spacing: -8px;
  margin-top: -7px;
  opacity: 0;
}
.nav-item:before {
  position: absolute;
  content: '';
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #EC7263;
  transform: translateY(-50%) scaleY(5);
  transition: 0.5s;
}

/* Dummy content */
.dummy-content {
  position: relative;
  text-align: center;
  transition: 0.5s;
}
.dummy-content:before {
  position: absolute;
  content: '';
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  z-index: 2;
  transition: 0.5s;
}

.circle {
  display: inline-block;
  width: 75px;
  height: 75px;
  background-color: #EC7263;
  border-radius: 100%;
}

.text {
  margin: 15px 0 30px;
}
.text span {
  display: inline-block;
  height: 10px;
  margin: 0 5px;
  background-color: #C06162;
  border-radius: 5px;
}
.text span:first-child {
  width: 50px;
}
.text span:last-child {
  width: 80px;
}

.square-top {
  display: inline-block;
  position: relative;
  width: 200px;
  height: 300px;
  background-color: #FEBE7E;
  z-index: 1;
}

.square-behind {
  display: inline-block;
  position: relative;
  top: -256px;
  width: 250px;
  height: 210px;
  background-color: #C28683;
}
.square-behind:before, .square-behind:after {
  position: absolute;
  content: '';
  top: 0;
  width: 40%;
  height: 100%;
}
.square-behind:before {
  left: 0;
  background-color: #9D567C;
}
.square-behind:after {
  right: 0;
  background-color: #958C6B;
}