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: |

The S&P 500 slumped 1.8% on Monday and Tuesday, thanks to China Evergrande, the Chinese property company that looks like it is ready to default on its more-than $300 billion in debt. Cries of the next Lehman Brothers—or maybe the next Silverado?—echoed through the canyons of Wall Street as investors prepared for the worst.

At a time when the Indian stock market is peaking and has rallied immensely compared to global markets, there are companies that have not performed in the last 10 years. These are definitely a minor portion of the market considering there are hundreds of stocks that have turned multibagger since 2020. What went wrong with these stocks? Reasons vary from corporate governance, sectoral weakness, company specific and so on. But the more important question is, are these stocks worth buying?

Nurmukhamedoff from sg


Telegram Nurmukhamedoff
FROM USA