try {
const mediaQueryMax1023 = window.matchMedia('(max-width: 1023px)')
const mediaQueryMin1024 = window.matchMedia('(min-width: 1024px)')
mediaQueryMax1023.addListener(mobile);
function mobile(media) {
if (media.matches) {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('DOMContentLoaded', function() { | |
console.log('window - DOMContentLoaded - capture'); // 1st | |
}, true); | |
document.addEventListener('DOMContentLoaded', function() { | |
console.log('document - DOMContentLoaded - capture'); // 2nd | |
}, true); | |
document.addEventListener('DOMContentLoaded', function() { | |
console.log('document - DOMContentLoaded - bubble'); // 2nd | |
}); | |
window.addEventListener('DOMContentLoaded', function() { |
/* make img wrapp square */
.kuGridView .klevuImgWrap{
height: auto !important;
}
.kuGridView .klevuImgWrap::before {
content: "";
display: block;
padding-bottom: 100%;
overflow: hidden
text-overflow: ellipsis
display: -webkit-box
-webkit-line-clamp: 2
-webkit-box-orient: vertical
Допустим, у нас эффект ховера на img. Тогда пишем для контейнера img-ов такое:
.wrap:hover img:not(:hover)
-webkit-filter: grayscale(1)
filter: grayscale(1)
opacity: 0.75
и прописываем здесь все элементы, которые нам нужно изменить, когда в ховере только один.
Или еще пример:
input
&:active, &:focus
transition: 0.35s ease
color: #1d1d1d
&::-webkit-input-placeholder
transition: opacity 0.3s ease
opacity: 0
&::-moz-placeholder
transition: opacity 0.3s ease
NewerOlder