Telegram Group & Telegram Channel
CSS is magic

Maqsad: agar straight-cash-discount bo'lsa, compare-price degan classni ko'rsatmaslik kerak edi (compare-price straight cashda avval keladi).
Avval buni Js da tezdagina bitirib qo'ygim keldi lekin CSS da buni iloji bo'lishi kerak deb biroz izlandim va topdim.

CSS :has() funksiyasi
Bu funksiya bizga JavaScript-siz dinamik stillarni qo'llash imkonini beradi!
:has() nima?
Bu CSS pseudo-sinfi bo'lib, elementlarni ularning ichidagi yoki keyingi elementlarga qarab tanlash imkonini beradi.

element:has(selector) {}

Shunda menda quyidagi kod ishladi,

.compare_price:has(~ .straight-discount-price:not(:empty)) {
display: none;
}

🤔 Nima uchun JavaScript emas, CSS?

Tezlik: CSS brauzerda tezroq ishlaydi shu sabab shunga o'xshash UI ga aloqador muammolarga yechimni iloji boricha CSS da berishda harakat qilaman.

Xullas, CSS is magic :).

@nurmukhamedoff_dev



tg-me.com/nurmukhamedoff_dev/1160
Create:
Last Update:

CSS is magic

Maqsad: agar straight-cash-discount bo'lsa, compare-price degan classni ko'rsatmaslik kerak edi (compare-price straight cashda avval keladi).
Avval buni Js da tezdagina bitirib qo'ygim keldi lekin CSS da buni iloji bo'lishi kerak deb biroz izlandim va topdim.

CSS :has() funksiyasi
Bu funksiya bizga JavaScript-siz dinamik stillarni qo'llash imkonini beradi!
:has() nima?
Bu CSS pseudo-sinfi bo'lib, elementlarni ularning ichidagi yoki keyingi elementlarga qarab tanlash imkonini beradi.

element:has(selector) {}

Shunda menda quyidagi kod ishladi,

.compare_price:has(~ .straight-discount-price:not(:empty)) {
display: none;
}

🤔 Nima uchun JavaScript emas, CSS?

Tezlik: CSS brauzerda tezroq ishlaydi shu sabab shunga o'xshash UI ga aloqador muammolarga yechimni iloji boricha CSS da berishda harakat qilaman.

Xullas, CSS is magic :).

@nurmukhamedoff_dev

BY Nurmukhamedoff


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/nurmukhamedoff_dev/1160

View MORE
Open in Telegram


Nurmukhamedoff Telegram | DID YOU KNOW?

Date: |

For some time, Mr. Durov and a few dozen staffers had no fixed headquarters, but rather traveled the world, setting up shop in one city after another, he told the Journal in 2016. The company now has its operational base in Dubai, though it says it doesn’t keep servers there.Mr. Durov maintains a yearslong friendship from his VK days with actor and tech investor Jared Leto, with whom he shares an ascetic lifestyle that eschews meat and alcohol.

In many cases, the content resembled that of the marketplaces found on the dark web, a group of hidden websites that are popular among hackers and accessed using specific anonymising software.“We have recently been witnessing a 100 per cent-plus rise in Telegram usage by cybercriminals,” said Tal Samra, cyber threat analyst at Cyberint.The rise in nefarious activity comes as users flocked to the encrypted chat app earlier this year after changes to the privacy policy of Facebook-owned rival WhatsApp prompted many to seek out alternatives.Nurmukhamedoff from us


Telegram Nurmukhamedoff
FROM USA