Islombe dev
68 subscribers
118 photos
26 videos
80 links
Here I share thoughts, news, memes.
Topic: IT and more :)

My website: https://islombe-dev.uz

My soc. networks:
- youtube.com/@islombe_dev
- instagram.com/islombe_dev
Download Telegram
Happy Sunday! ☺️

Here are some useful CSS Tricks for Frontend Developers 👩‍💻
All examples shown here.

0️⃣Sticky Footer
Ensure your footer sticks to the bottom of the page, even if the content is short.

body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.content {
flex: 1;
}
footer {
background: #333;
color: white;
text-align: center;
padding: 10px;
}


1️⃣Custom Scrollbars
Style your scrollbars to match your site design using the ::-webkit-scrollbar pseudo-element.


::-webkit-scrollbar {
width: 20px;
}


2️⃣Text Stroke
Create outlined text using -webkit-text-stroke.


h1 {
-webkit-text-stroke: 2px black;
color: white;
}


3️⃣Viewport Units for Typography
Scale text size based on the viewport using vw units.

h1 {
font-size: 10vw;
}


4️⃣CSS Grid Auto-Placement
Control the automatic placement of grid items with grid-auto-flow.


.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
grid-auto-flow: dense;
}


5️⃣Aspect Ratio Box
Maintain aspect ratio with the padding trick.


.aspect-ratio-box {
width: 100%;
padding-top: 56.25%; /* 16:9 aspect ratio */
position: relative;
}


6️⃣Clip-Path for Custom Shapes
Create custom shapes using clip-path.

.clip-path {
clip-path: polygon(50% 0%, 0% 100%, 100% 100%); /* triabgle */
background: red;
width: 100px;
height: 100px;
}


7️⃣CSS Variables with JavaScript
Dynamically change CSS variables using JavaScript.


:root {
--main-color: #3498db;
}



function changeCssVar() {
document.documentElement.style.setProperty('--main-color', '#e74c3c');
}


8️⃣Object-Fit for Images and Videos
Control how media fits within a container using object-fit.


img, video {
width: 100%;
height: 100%;
object-fit: cover;
}


9️⃣CSS Counters
Create custom counters with counter-reset and counter-increment.


.counter {
counter-reset: section;
}
.counter h2::before {
counter-increment: section;
content: "Section " counter(section) ": ";
}


Use these CSS tricks to enhance your frontend skills and create more dynamic and visually appealing web applications!

#CSS #WebDevelopment #Frontend #Tips #Tricks

@typical_ddev
Please open Telegram to view this post
VIEW IN TELEGRAM
1
Tailwind CSS v4.0 is here 🔥

Yesterday my colleague told me about the new Tailwind 4 and I didnt expect that much changes.
Faster builds, modern features, and so much more - it’s packed with everything we’ve been waiting for. Let me list the most interesting and key things:

Insane Performance Boost 📈
- Full builds are now 5x faster (yes, really)
- Incremental builds? 100x faster - perfect for quick iterations

Modern CSS Awesomeness 🎨
- We finally have cascade layers
- Custom properties are registered automatically
- Plus, color-mix() support for advanced color manipulation

Setup Made Simple 🛠
- All it takes is one line of code to get started
- And there’s a new Vite plugin that integrates beautifully

Customize in Your CSS 👩‍💻
- Forget hunting through config files - just tweak directly in your CSS.

Cool New Features 🆕
- Container queries for responsive magic.
- 3D transform utilities for some creative flair.
- Expanded gradient APIs for stunning visuals.

Full update log

#tailwind #webdev #frontenddeveloper #frontend
Please open Telegram to view this post
VIEW IN TELEGRAM