4-molecules

Copy
Edit
Copy
Copy
Edit

m_video   

Copy
Edit
<!-- components/4-molecules/m_video.txp --> <video controls class="m_video"> <source src="https://all-grid.all-sorts.biz/files/Wairarapa%20DIY.mp4" type="video/mp4"> </video>
Copy
Copy
Edit
/* scss/6-molecules/_m_video.scss */ .m_video { position: relative; width: 100%; height: 100%; object-fit: cover; &__holder--crop-top { overflow: hidden; > video { margin-top: -1px; } // transform: scale(1.1); } + p { // caption text-align: center; } }

m_hamburger   

Copy
Edit
<!-- components/4-molecules/m_hamburger.txp --> <button class="plain m_hamburger__button" onclick="this.classList.toggle('is-active');this.setAttribute('aria-expanded', this.classList.contains('is-active'))" aria-label="Main Menu"> <div class="m_hamburger__icon"> <div></div> </div> </button>
Copy
Copy
Edit
/* scss/4-molecules/_m_hamburger.scss */ .m_hamburger { position: fixed; left: 0; right: 0; top: 0; padding-top: my-bs(1.5); padding-right: var(--base-unit); padding-left: var(--base-unit); z-index: 100; &[open] { background-color: var(--hamburger-background-colour); bottom: 0; } > summary { display: flex; justify-content: flex-end; } &__button { width: 28px; background-color: var(--background-colour); [open] & { background-color: var(--hamburger-background-colour); } } &__icon { &:after, &:before, & div { background-color: var(--black); //border-radius: 3px; content: ''; display: block; height: 2.5px; margin: 7px 0; transition: all .2s ease-in-out; } &:hover:after, &:hover:before, &:hover div { opacity: .5; } .is-active & { &:before { transform: translateY(9.5px) rotate(135deg); } &:after { transform: translateY(-9.5px) rotate(-135deg); } div { transform: scale(0); } } } &__menu { } }

m_thumb   

Copy
Edit
<!-- components/4-molecules/m_thumb.txp -->
Copy
Copy
Edit
/* scss/4-molecules/_m_thumb.scss */ .m_thumb { position: relative; &__inner { > *:last-child { margin-bottom: 0; } } // &.landscape figure { // aspect-ratio: 3/2; // } // &.portrait figure { // aspect-ratio: 2/3; // } // &.square figure { // aspect-ratio: 1/1; // } // // video { // aspect-ratio: 3/2; // object-fit: cover; // } }
Copy
Edit