Jump to content

Blogger

Blog Bot
  • Joined

  • Last visited

    Never

Everything posted by Blogger

  1. by: Ted LeRoy Mon, 18 Aug 2025 09:07:23 +0530 Linux and its famed command line is vast. But you have to start somewhere. If you are completely unfamiliar with the Linux commands, terminal and the bash shell, this micro course is for you. In an hour or two, you'll get acquainted with the most common Linux commands, learn to seek help from man pages and learn to navigate through bash shell. 📶 Difficulty level: Beginner ⏳ Time to complete: Approx. 1 hour 📋 Prerequisite: None 📹 Type: Primarily video courseWhat will you learn? In this crash course on Linux commands, you'll learn the following: Know your way around the Linux terminal and command lineIntroduction to bash shellUnderstanding man pages to get help on a Linux commandCase sensitivity in LinuxGet familiar with the concept of superuser and rootMost common Linux commandsNavigating the Bash shellPrerequisiteThere is no requirement as such. You should know how to use a computer at least. The course presumes that you are an absolute beginner to Linux commands. But you can still use it to brush up the basics if you have forgotten your ways around the command line. Who is your instructor?Ted LeRoy is an Enterprise Security Architect, providing a variety of information and physical security guidance to his business. Ted is also best-selling online instructor specializing in technology related courses. He has over 20 years in Information Technology and experience in Windows and Linux administration, web server and email administration, and network and firewall administration with Cisco, Juniper, and pfSense devices. How to use this course?💡This course is available to both free and Pro members of Linux Handbook. If you are not a member yet, sign up for free here. You can simply watch the videos to see things in action. Although, it is highly recommend that you follow the instructions and steps on your own system. That will be the best approach here. For that, you should have access to a Linux system. You can use WSL on Windows or install it in a VM. Of course, you can use a full Linux desktop. You may also use a cloud server. Any Linux distribution should work fine. The course also contains text. So if you have to revise the lessons, you can quickly go through the text instead of going through the video again. The course is divided into chapters. The chapters of the series are always visible in the left sidebar and you can easily switch between them. The sub-sections of a chapter are located in the right sidebar. The next and previous chapter navigation are also present at the bottom of each chapter. For any doubts, you can always use the comment section available under each chapter. Let's start learning Linux!
  2. Blogger posted a blog entry in Linux Tips
    by: Abhishek Prakash Sun, 17 Aug 2025 18:23:30 +0530 SSH has become a must know tool for sysadmins and developers alike. Often, your production or test server is in a remote location and then you have to use the ssh command to connect to the remote server from your local system. And then you run and execute commands on the remote server from your local machine through the SSH connection. This is an absolute beginner's course for Linux beginners, sysadmin beginners, network admin beginners, software developers, or anyone who wants to use SSH. The course assumes that you have no previous knowledge of SSH, terminal, or Linux commands. 📶 Difficulty level: Beginner ⏳ Time to complete: Approx. 4 hours 📋 Prerequisite: None 📹 Type: Primarily video courseWhat will you learn? In this crash course on Linux commands, you'll learn the following: What is SSH and why you should use itSet up a lab environment with VirtualBoxUse SSH between two systemsBasic Linux commandsBasic text editing in the terminalConfigure key based authenticationBest practices to secure SSHCopy files between remote systems with SCPMaintain continuous SSH connection using screen or nohup commandsPrerequisiteThere is no requirement as such. You should know how to use a computer at least. The course presumes that you are an absolute beginner to SSH and Linux commands. But you can still use it to brush up the basics if you have forgotten your ways around SSH. Who is your instructor? Ted LeRoy An Enterprise Security Architect, Ted has been providing a variety of information and physical security guidance to businesses. He is also a best-selling online instructor specializing in technology related courses. He has over 20 years in Information Technology and experience in Windows and Linux administration, web server and email administration, and network and firewall administration with Cisco, Juniper, and pfSense devices. How to use this course?💡This course is available only Pro members of Linux Handbook. If you are not a Pro member yet, sign up here. You can simply watch the videos to see things in action. Although, it is highly recommend that you follow the instructions and steps on your own system. That will be the best approach here. The course also contains text. So if you have to revise the lessons, you can quickly go through the text instead of going through the video again. The course is divided into chapters. The chapters of the series are always visible in the left sidebar and you can easily switch between them. The sub-sections of a chapter are located in the right sidebar. The next and previous chapter navigation are also present at the bottom of each chapter. For any doubts, you can always use the comment section available under each chapter. Let's start learning SSH!
  3. by: Abdullah Tarek Sun, 17 Aug 2025 17:06:24 +0530 Did you know that Docker dominates the containerization market with a huge share of over 80%? That's right, and as a future DevOps Engineer, you will be the one responsible for managing these Docker containers. I'll cover everything you need to know about Docker in this series to help you get started and become a Docker expert by the end. 📶 Difficulty level: Beginner ⏳ Time to complete: Approx. 8 hours 📋 Prerequisite: Basic Linux commands and networking knowledge 🗒️ Type: Primarily text-based courseWhat will you learn?In this Docker course, you'll learn the following: Introduction to DockerSetting up your Docker environmentManipulating Docker containersWorking with Docker imagesVolumes and data persistenceExploring DockerfilesDocker Compose Docker NetworkingPrerequisiteBasic Linux knowledge: Terminal navigation & file system conceptsNetworking Fundamentals: IP addresses, ports, and TCP/IP How to use this course?This course is available only for Pro members of Linux Handbook. If you are not a Pro member yet, sign up here.Get Hands-on! We believe in learning by doing. You'll engage in practical exercises that simulate real-world scenarios throughout the course. For the most optimal experience, we recommend following the instructions and commands directly on your machine. By the end of this course, you'll have the knowledge and confidence to navigate the world of containerization, building and managing your containerized applications easily. Without further ado, Let's dive into the first chapter!
  4. by: Abhishek Prakash Sun, 17 Aug 2025 12:20:49 +0530 Once you have a little bit of idea about the terminal, Linux command structure, path and directory hierarchy system, you should know about handling files in Linux. As a Linux user, you have to deal with all kinds of files and all kinds of file operations. You should know how to display the contents of files, create new files, change their properties. You should also know how to look for files and edit them. In this section of Linux Handbook, you'll learn about various Linux commands that you can use for file managements. I have categorized the commands into sections so that it is easier for you to follow. Basic file commandsForm listing files to copying them, these commands will help you. Command Description Example ls List files in a directory ls command examples cp Copy files and directories cp command examples mv Move (rename) files and directories mv command examples ln Create links to files and directories ln command examples Directory operation commandsThese commands will handle creating, moving around and removing directories. Command Description Example cd Navigate between directories cd command mkdir Create new directories mkdir command rmdir Delete the empty directories rmdir command File viewing commandsView the contents of a file in Linux terminal with these commands: Command Description Example cat Join several input files by sequentially or display contents cat command head Print a specified number of lines from the beginning of the file head command tail Outputs the last parts of a single file or multiple files tail command less Viewing text files less command more Opens a text file in page views more command File editing commandsEdit files in the terminal with these editors: Command Description Example Vim Popular command line text editor Vim commands Emacs Popular Text Editor Emacs commands File properties commandsLearn about the timestamps, size, number of lines and many more such attributes of files with these commands: Command Description Example wc Count the number of lines, words and characters of text file wc command chgrp Changing the group of a file or directory chgrp command touch Changing file timestamps/creating new empty file touch command chmod Changing the mode of access chmod command du Checking the size of directory du command file Determine actual type of file and related information file command stat Get file attribute information stat command chown Change user and group ownership of a file/directory chown command chattr Make a file 'undeletable' even by root chattr command File searching commandsThese commands will let you search for files on your system. Command Description Example which Locates an executable file in your shell’s search path which command locate Preform a super quick search for files locate command xargs Build and execute commands from standard input xargs command find Searching for files and directories find command File manipulation commandsManipulate the output of text files with these commands Command Description Example grep Find patterns in files grep command cut Removing “columns” or data on each line of a text file cut command paste Merges several input files to produce a new delimited text file paste command tee Reads from standard input and writes to both standard output and files tee command expand Convert the tabs into spaces expand command tr Translating one type of characters into another tr command sort Sorting the contents of the text files sort command uniq Filtering duplicate text from a file uniq command
  5. Blogger posted a blog entry in Linux Tips
    by: Sagar Sharma Sun, 17 Aug 2025 09:54:02 +0530 I have used Flatpak packages since I was introduced to them. The reason? They solve one of the core problems every Linux desktop user faces: managing packages on Linux. Yes, I'm aware of the fact that there are default package managers such as apt on Debian-based distros, pacman on Arch and yum on RHEL-based distros. For the most part, these package managers do a great job (for the most part - I'm repeating again). When you change your Linux distribution, you need to learn the new package manager along. Furthermore, managing dependencies between two packages might conflict and that's where the Flatpak comes in. What is Flatpak? Flatpak is a package management utility for Linux that allows developers to distribute applications in a sandboxed environment, isolated from the rest of the system. Flatpak packages are portable and are designed to run across different Linux distributions, eliminating dependency issues that may occur with traditional package managers. Another good part is that Flatpak packages come bundled with their own libraries and dependencies. So you don't have to worry about dependencies. This solves a huge problem as on a Linux system, different packages/services might require different versions of one package. For example, if you're running GNOME and try to install a KDE application using the default package manager, you will find the dependency list is huge in size, and even bigger than the actual package. This can be solved using Flatpak. Applications installed via Flatpak run in an isolated environment with limited access to system resources. This enhances security by preventing compromised apps from affecting the rest of the system. Using Flatpak, you can install multiple versions of the same package. Sure, it requires some extra effort but it is doable. What are the pros and cons of Flatpak?Like any software solution, Flatpak comes with its own pros and cons. Here, I will be addressing the pros and cons of using Flatpak so you can decide whether Flatpak will be powering your system or not. Pros of using Flatpak Runs on any Linux distribution (if you install Flatpak support on it). Often provides the most recent version of the package. Ability to install packages for individual users without affecting the whole system. Flatpak packages run in an isolated environment which enhances security by limiting access to system resources. Flatpak packages come bundled with all the necessary dependencies, avoiding conflicts with the system. Flatpak is decentralised which means it can be hosted and updated independently without relying on a single repository. Cons of using Flatpak As the packages are bundled with all the dependencies, the size of the package is quite large compared to what you get with the default package manager. Flatpaks are isolated and are only given limited access to the system which often causes trouble. For example, by default, I can not send files located inside the root directory from Discord (Flatpak version) due to limited access. Many times, Flatpaks won't pick the system-wide theme. Sure, you can theme Flatpak but it requires additional steps. It only works when you have a desktop environment installed. This means you can not run Flatpak on the Ubuntu server. Should you use Flatpak? If you love using the most recent version of packages and want to install multiple versions of the same package without worrying about the dependency resolution, then Flatpak can be a great choice. In fact, distros like Fedora silverblue, elementaryOS, Endless OS, etc. come pre-configured with flatpak packages. Just one con and that's the filesize. In my opinion, it will only affect users with low-end specs so even if you have a moderately spaced computer, you should give it a try. This section of Linux Handbook gives you the necessary resources to start using Flatpaks on your Linux system.
  6. by: Geoff Graham Fri, 15 Aug 2025 12:55:36 +0000 Filing this in the “Missed First Time Around” category. It popped up in the Firefox 139 release notes and I was, like, ooo neat. Then I saw it’s been in Chrome since at least 2022. And as I wrote this, it landed in Safari Technology Preview 125. So there you have it. Turns out there are a few good posts and tutorials about hidden=until-found floating out there, so I thought I’d jot down a few key takeaways for later reference. It makes hidden content “findable” Short story: Slapping hidden=until-found on an element in HTML enables any hidden content within the element to be findable in the browser with in-page search. <div hidden="until-found"> <!-- hidden content --> </div> You’ll see, or more accurately not see, that the content is hidden with that in place: CodePen Embed Fallback It’s content-visibility: hidden under the hood The browser takes that as a hint to hide the content and does so by implicitly setting content-visibility: hidden on the element in the user agent styles. If we do a Ctrl+F on the keyboard to activate in-page search and enter a query, then a match reveals the content, highlighting said matched query. Why we need this That’s what I was asking myself when I started digging into this a little deeper. The most prominent example of it being used is from the Chrome for Developers docs as a faux-accordion. You know, a series of panels that open and close on click. CodePen Embed Fallback But isn’t that a solved deal now that we have the <details> element at the ready? May as well use a semantic disclosure widget to, you know, disclose content. Indeed, browsers also set content-visibility: hidden on the ::details-content portion of the element that holds the content. I’m pretty sure <details> was not as widely supported in 2022 as it is today. It’s actually part of Interop 2025 and notice that one of the functionalities mentioned is the capability for in-page search. Chrome already supports it. Firefox recently shipped it (ostensibly as part of the hidden=until-found release). And Safari will presumably get there with Interop 2025. The example from the Chrome for Developers post demonstrates an approach for working around a not-fully-supported <details> element and now we have it. So, why hidden=until-closed? I don’t know. I’m sure there’s a good use case for hiding content accessibly in some fashion while making it searchable. I just can’t think of it off the top of my head. I mean, we have popover as well, but that takes a different approach with display: none which completely removes the content from in-page search. Browser support and polyfill We’ve already established that Chrome and Firefox are on board. Safari is the bigger holdout, but knowing that making the hidden content in <details> findable is part of Interop 2025 (and Firefox’s corresponding support for it as part of that effort) makes me think it’s around the corner. (Turns out that hunch was correct because it landed in Safari Technology Preview 125 after writing this.) In the meantime, though, is it worth using hidden=until-found? Because if we’re aiming for a consistent cross-browser experience, we’d need to do some sort of swap between content-visibility: hidden to hide the content and content-visible: auto to reveal it. Nathan Knowler expertly explains the conundrum this creates. We can’t set content-visibility: hidden on something without also removing it from in-page search. The hidden=until-found attribute works exactly like content-visibility: hidden but maintains that in-page search still works. In other words, we can’t polyfill the feature with content-visibility. Thanks, Nathan, for going down the massive rabbit hole and finding a solution that leverages the Shadow DOM to look for the HTML attribute, check support, and revert its properties when needed to accessibly hide the content visually without fully nuking it from being found. Styling Seems like there isn’t much to say about styling something that ain’t visible, but notice that the in-page search feature highlights content that matches the search query. Looks like we may get a new ::search-text pseudo that allows us to select the matched query and style the highlight color in the CSS Pseudo-Elements Module Level 4 specification, which is currently in Editor’s Draft status at the time I’m writing this. What about multiple matches? The current selection gets a different highlight from subsequent matches. We’ll presumably, according to the spec, be able to combine ::search-text with the :current pseudo-class to target the current match: ::search-text:current. If you’re thinking we might get to mix-and-match ::search-text with the corresponding :past and :future pseudo-classes, I’m afraid the spec says nay. But it does not shut the door on it completely: Anything else? Not really, but I do like the note at the end of Christian Shaefer’s “Rethinking Find-in-Page Accessibility” post that says consideration needs to go into what happens after a search query matches content on the page. Currently, the content remains visible even after in-page search is closed or canceled. Perhaps we’ll need some other HTML hint for that. Links A dump of things I found and used while researching this: “Making collapsed content accessible with hidden=until-found” (Joey Arhar) “Polyfilling hidden until-found” (Nathan Knowler) “Hidden until found” (James McGrath) “The hidden=until-found HTML attribute and the beforematch event” (WICG explainer) “Announcing Interop 2025” (WebKit Blog) Bugzilla Ticket #1761043 MDN content update (GitHub) ::search-text (CSS Pseudo-Elements Module Level 4) Covering hidden=until-found originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.
  7. by: Geoff Graham Fri, 15 Aug 2025 12:26:00 +0000 I love “re-learning” things I thought I knew. HTML is full of those opportunities (case in point, like today) since it’s where you typically start learning about web development. And in those early days, you don’t know what you don’t know. So, thanks Jim Nielsen for giving me a reason to give URL patterns another look. It’s easy to take URL superpowers for granted, even if you already have these patterns under your belt. The patterns: <a href=""> <!-- Scrolls to the top of a document --> <a href="#"> <!-- Reloads the current page, preserving the search string but removing the hash string (if present). --> <a href="."> <!-- Reloads the current page, removing both the search and hash strings --> <a href="?"> <!-- Reloads the current page, removing both the search and hash strings (keeps `?`) --> <a href="data:"> <!-- Link to data URLs, like text fragments --> <a href="video.mp4#t=10,20"> <!-- Links to specific parts of a media file --> But do yourself a favor and read Jim’s full post. He gets way more into the weeds, referencing the specification and stress testing different configurations. I mean, this is gold: Me neither. A Few Things About the Anchor Element’s href You Might Not Have Known originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.
  8. by: Abhishek Prakash Fri, 15 Aug 2025 16:25:44 +0530 Good news! The new ebook I was talking about in the previous newsletter is here. It's basically a collection of around a 100 little command line tips that I have shared on Twitter and in this newsletter. Pro members can download this book for free from here. Linux Command NuggetsMaster powerful Linux command-line tips in minutes, not hours. Say goodbye to endless Googling and hello to a faster, smarter terminal workflow.Linux HandbookAbhishek PrakashI consider it a 'work-in-progress' as I am looking for feedback and suggestions to improve the quality and style of this little ebook. Last week to get the lifetime membership of Linux Handbook for just $99. For a single payment, you get the paid membership to download all 7 ebooks and access all premium 7 courses. No recurring payment, you pay just once and enjoy forever. Get Lifetime membership for just $99 (instead of $139)       This post is for subscribers only Subscribe now Already have an account? Sign in
  9. Blogger posted a blog entry in Linux Tips
    by: Abhishek Prakash Fri, 15 Aug 2025 15:59:47 +0530 This book does not teach you to use the Linux commands in the traditional sense. It assumes that you are already familiar with the common Linux commands and use them occasionally or regularly on your Linux system(s). This book presents you with small tips on using those commands that you probably didn’t know. Like sorting the top command by RAM usage or creating multiple folders at once that match a given pattern. It lets you go, "Wow! I didn't know that this command could do that." You will love discovering these small nuggets of command line tips and when you put them into practice, they will help you become slightly more efficient at the Linux command line. It's a quick, light reading. You can store it on your Kindle and have a look at it on a lazy afternoon. Highlight the ones that you liked for quick access in the future.       This post is for paying subscribers only Subscribe now Already have an account? Sign in
  10. by: Abhishek Prakash Fri, 15 Aug 2025 15:31:35 +0530 This post is for subscribers only Subscribe now Already have an account? Sign in
  11. by: Geoff Graham Thu, 14 Aug 2025 13:10:11 +0000 My brain can’t help but try to make connections between seemingly disparate ideas. And that’s what happened yesterday when I read: Hidde’s “Can components conform to WCAG?” Joas’s “Automating Design Systems” Zell’s “We Might Need Something Between Root and Relative CSS Units for “Base Elements” What we have is: A semantic issue of saying that individual components can conform to WCAG. We might be able to “optimize” a component for accessibility, but accessible experiences are composed of complete web pages containing components designed to work together. A desire to automate all things in a design system. Update it here and it updates all over. But there’s still this matter of knowing if changing one component in a design system impacts other components. A musing over a possible new CSS “base” unit. The idea is to set one element as a “base” that allows other elements to inherit its font-related properties as roots for better vertical rhythm between elements, no matter their proximity. Makes me think: Could a base unit in CSS make components more interoperable? Like, if buttons could inherit its font size depending on what other component it is in? Sorta like container query units, but without needing additional wrappers in the markup. Would that allow design systems changes to cascade between components more smoothly? Will properties inherited through a base element make components more optimized for WCAG conformance when implemented on a page with other components? Does this overlap with CSS @scope at all? Sorry for the shower thoughts, but it’s interesting to consider how these ideas work together. On Accessibility Conformance, Design Systems, and CSS “Base” Units originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.
  12. by: Abhishek Prakash Thu, 14 Aug 2025 04:37:26 GMT Debian 13, codenamed Trixie, is finally available now. It features GNOME 48 among other changes. The next big release should be Linux Mint 22.2 followed by Fedora 43 and Ubuntu 25.10 in October. Debian 13 “Trixie” Released: What’s New in the Latest Version?A packed release you can’t miss!It's FOSS NewsSourav RudraI'll see if I can do a video review of the new Debian release. 💬 Let's see what else you get in this edition A new Linux kernel drama.Microsoft Recall exposing sensitive data.Over $1M being stolen via fake Firefox extensions.And other Linux news, tips, and, of course, memes!📰 Linux and Open Source NewsLinus Torvalds has called some RISC-V patches "garbage".AlmaLinux OS 9 and 10 now have native support for NVIDIA GPUs.Bumpbuddy is Arch Linux's new tool for monitoring outdated packages.HandBrake 1.10 is here with handy presets for social media content creation.Google has discontinued Steam for Chromebook, marking a new entry into its graveyard. ONLYOFFICE is going all in with its AI features. They recently introduced AI agents.A massive cyberattack campaign sees people losing over $1 million. Over $1M Stolen via Fake Firefox Extensions in GreedyBear CampaignFirefox users need to take note of this.It's FOSS NewsSourav Rudra🧠 What We’re Thinking AboutMicrosoft Recall has failed spectacularly, exposing passwords and banking data. Microsoft Recall Exposes Passwords and Banking Data!New tests reveal Microsoft Recall still screenshots sensitive data.It's FOSS NewsSourav Rudra🛍️ Don't Miss: Linux ebooks and videos bundleLevel up your Linux skills with the latest Humble Tech Book Bundle with courses by Pearson. Get professional-quality lessons like UNIX® and Linux® System Administration Handbook, Fifth Edition, Linux performance optimization, and more. Pay what you want for a whole new user experience on your favorite machine—and help support The BINC Foundation with your purchase! Humble Tech Book Bundle: Linux Complete by PearsonUnleash your machine’s potential with our latest Humble Tech Book Bundle: Linux Complete—customize, design, and help support The BINC Foundation today!Humble BundleExplore Linux Bundle🧮 Linux Tips, Tutorials, and LearningsNala is a Python-based frontend for apt package management.Learn the basics of Markdown syntax.Get a 'perfect' GNOME desktop setup with Just Perfection.Here are 15 co-op games that you can play on Linux with your buddies.15 Co-Op Games for Linux Steam Gamers in 2025Squad up with your friends in these awesome co-op games!It's FOSSSourav Rudra👷 AI, Homelab and Hardware CornerElecrow is a company that supports makers, startups, and educators with electronics and prototyping tools. They are organizing a contest for DIY homelab, IoT enthusiasts to show off their projects. Every successful submission gets a free LoRA module. Winners get cash prizes of $1,000 in total. Elecrow IoT Contest - Free Lora Module for Every ContestantJoin Elecrow IoT Hardware Contest! Submit your IoT project, get a free Lora module, and win $1,000 in cash. Build innovative IoT solutions and compete today!ElecrowElecrow's IoT Contest✨ Project HighlightIYPS is a handy tool for checking password strength. IYPS: An Open Source Password Strength Checker App You Didn’t Know You NeededIf you have been curious to know how secure your passwords are, try this app.It's FOSS NewsSourav Rudra Why should you opt for It's FOSS Plus membership: ✅ Ad-free reading experience ✅ Badges in the comment section and forum ✅ Supporting creation of educational Linux materials ✅ Free Linux eBook Join It's FOSS Plus 📽️ Videos I am Creating for YouGetting started with Hyprland is difficult. There is a new Arch-based distro that makes Hyprland easier. Subscribe to It's FOSS YouTube Channel🧩 Quiz TimeA fun personality quiz. Take the quiz and find out what kind of Linux user you are. What Type of Linux User Are You? [Fun Quiz]Discover your Linux personality with this fun quiz.It's FOSSAbhishek PrakashCan you save Tux? He has been kidnapped and is being kept in a closed-source fort. Save The Tux With Linux Command Knowledge QuizIf you know the Linux commands, you can save tux!It's FOSSAnkush Das💡 Quick Handy TipIf you are using GNOME Boxes, you can send keyboard shortcuts like CTRL+ALT+F6, CTRL+ALT+DEL, etc. without affecting the host system. Click on the "Keyboard" button on the top-right of the GNOME Boxes Guest window. Here, select the required signal from the drop-down menu. This is useful in cases where you want to access TTY as a guest. 🤣 Meme of the WeekWhen will this wait be over? 🥲 🗓️ Tech TriviaOn August 12, 1981, IBM introduced the Model 5150 Personal Computer with a 4.77 MHz Intel 8088 chip and MS-DOS, sparking a wave of PC clones that made x86 processors the standard for desktops. 🧑‍🤝‍🧑 FOSSverse CornerOne of our FOSSers is looking for an Arch-based distro with minimal Rust components. Can you suggest any? Looking for Arch-based Distros with Minimal Rust PackagesI’m mostly just putting out feelers for what’s available at the moment. I’m looking for something that meets the following criteria: Arch-based Beginner/intermediate friendly (I.e. won’t require constant work to fix bugs) Doesn’t incorporate Rust beyond what’s already in the kernal. I really like CachyOS. It’s super fast even on limited hardware thanks to the BORE scheduler, has been fairly reliable (especially for a rolling release), is relatively easy to use, and the theming looks…It's FOSS CommunityThunder_Chicken❤️ With lovePlease share it with your Linux-using friends and encourage them to subscribe (hint: it's here). Share the articles in Linux Subreddits and community forums. Follow us on Google News and stay updated in your News feed. Opt for It's FOSS Plus membership and support us 🙏 Enjoy FOSS 😄
  13. by: Zell Liew Wed, 13 Aug 2025 13:24:55 +0000 CSS provides us with root and relative values. Root values are like rem and rlh — they’re tied to the values written in the :root selector (the most common one would be the html element). Relative values are like em, lh, ch and various others — they’re tied to the font-size in that specific element. I’ve come to realize that perhaps we need to have a unit between root and relative values. Having such a unit allows us to size things without complex em or lh calculations. Let me give you an example: Prose Earlier this year, Jen Simmons wrote about the using the lh unit to style margin and padding for better typographical vertical rhythm. p { margin-block: 1lh; } We can expand the concept a little further to include all other spaces around the text. One way of doing this is the “Lobotomized Owl” technique that Heydon Pickering popularized a while ago. * + * { margin-top: 1lh; } Today, we can also use the :not(:first-child) to achieve the same effect — and that might be a tad more readable. *:not(:first-child) { margin-top: 1lh; } Often, we need to constrain these selectors so they don’t spill everywhere and break the rest of the page. One great class for this is .prose. .prose { *:not(:first-child) { margin-top: 1lh; } } This is simple and good — but what happens if you include typography of other sizes…? You’ll see this break down incredibly quickly (because 1lh of a <h2> element can be incredibly big). CodePen Embed Fallback One way around this issue is to use Flexbox on the parent element. By doing so, we can set gap to 1lh and we don’t have to deal with the value of 1lh changing on the h2 element. (Bonus, we also don’t have to deal with margin collapse.) .prose { display: flex; flex-direction: column; gap: 1lh; } CodePen Embed Fallback But we introduce a new problem here: proximity confusion. Content below <h2> belongs within the <h2>. But content above the <h2> belongs with the previous section header. We should, ideally, make the spacing different to clarify their relationship. The simplest way is to add a little margin above the <h2>. But we can’t add margin above <h2> with lh since the lh value on <h2> will be different from that of the surrounding elements. CodePen Embed Fallback We have to use a little CSS trickery and margin-bottom (or the logical equivalent) on the element above the <h2>. Here, we simply set margin-bottom to 1lh since we use Flexbox and don’t have to deal with margin collapse. (If you had to deal with margin collapse, you’d have to set margin-bottom to 2lh.) CodePen Embed Fallback Is there a better way? Well, that’s what this article is about! But before we go there, let’s consider a different UI that has similar problems so you can begin to see the greater ramifications of this problem (and the importance of the solution). Here’s a second example: Card component Now let’s say we have a card component that’s divided into two parts, header and content. In these kind of components, the header is often styled with a different font-size than the content. To create such a card, the simplest markup may be: <div class="card"> <h2 class="title">Card Title</h2> <div class="content">Card Content</div> </div> Unfortunately, we cannot use the lh unit to create the padding within the card — doing so causes the margin on the <h2> element to blow (incredibly) out of proportion! CodePen Embed Fallback There are, of course, many ways to handle this type of situation. One possible way is to change the markup such that the <h2> resides in a <header> element. When we do this, we can apply the padding on the <header>, bypassing the enlarged 1lh problem. <div class="card"> <header class="title"> <h2>Card Title</h2> </header> <div class="content">Card Content</div> </div> CodePen Embed Fallback While changing the markup solves the problem, it’s not ideal — since we probably don’t want to create an extra header element unless it’s necessary… Well, another possible method is to use a root value like rlh. This allows <h2> and content to use the same base unit, and therefore, create the same padding. CodePen Embed Fallback But we still run into problems if the .card needs to scale to different font-size values. Imagine you want to make a smaller card — now 1rlh isn’t going to look right since the padding value becomes too big in proportion to the content. CodePen Embed Fallback What can we do? A simple solution is to change the padding value according to the supported variants of the component — but this kinda thing is sorta hard-coded and not very friendly… .card-sm { --padding: 0.75rlh; } .card-md { --padding: 1rlh; } .card-lg { --padding: 1.25rlh; } CodePen Embed Fallback What’s the alternative? This is where an intermediary between root and relative units might come in handy. The handy in-between unit This section is purely speculative CSS to illustrate a point. We’ll follow up with a simple way to actually do this in practice today in a later section, so hang tight and follow along conceptually for now. Let’s say we have a unit that takes it’s reference value from a specified element. We’ll call this a base unit, for lack of a better name. So, 1 base font-size unit could be 1bem. And 1 base line-height unit could be 1blh. Pretty easy at this point. Imagine we can style the cards with this base unit. Then we can simply use 1blh to quantify the padding and everything else would be sized appropriately: .card { > * { padding: 1blh; } } .card-sm { font-size: 0.8em; } .card-md { font-size: 1em; } .card-lg { font-size: 1.2em; } Hurrah? Tying this back to the .prose example earlier, it could very well resolve the proximity confusion issue without complicating our selectors: .prose { h2:not(:first-child) { margin-top: 2blh; } } How might this work? For this function to be added easily to modern CSS, I could think of two possible ways: Attach that to container queries. Define a syntax similar to anchor positioning. The container query method We already have stuff like cqw and cqh to denote container width and container height values. It’s not too far of a cry to say we could have a cqem (container-query em) unit or cqlh (container-query line-height). There are downsides to this approach. First, containers need to be defined in a parent element. This requires more markup and makes the code somewhat complex and unintuitive. This code below might be a possible implementation: <div class="container"> <div class="card"> <h2 class="title">Card Title</h2> <div class="content">Card Content</div> </div> </div> .container { container-type: inline-size; } .card { > * { padding: 1cqbl; } } Dealing with nested containers isn’t much a problem, because we can always set the container-name we want to inherit from. But, there might be a collision if we want to use different container references for cqbl and cqw. Imagine this: <!-- We might want to inherit the cqem or cqbl from here --> <div class="container-base"> <!-- But we might need cqw or cqh from here --> <div class="two-column-grid"> <div class="card">...</div> <div class="card">...</div> </div> </div> Kinda sucks to be limited by container collisions. Anchor positioning syntax In this case, we first decide the base we want to inherit from. We can call this a base-anchor, or something similar. Here, we can explicitly set a base anchor name — or perhaps even leave it as none if we don’t wanna name it. Then the rest of the elements within could inherit from this base value immediately: .card { base-anchor: --card; /* or perhaps none */ > * { padding: 1blh; } } If we need to refer to this anchor from a completely unrelated component, we can leverage the anchor name and simply do this: .far-away-comp { base-name: --card; /* Then use blh from here */ } Double anchor One fascinating aspect I can think of is a potential double-anchor use case where the base component is able to inherit its font-size or value from yet another base or its parent element. This flexibility lets us create component variations based on font sizes incredibly easily without needing to rely on complex em calculations. Here’s an example of what I’m talking about: .prose { base-anchor: --prose; font-size: 1em; line-height: 1.5; } /* Inherits font-size from .prose */ /* This is automatic if base-name is not provided */ .card { base-anchor: none; base-name: --prose; /* In this case, 1blh could be 1.5em */ > * { padding: 1blh; } } /* After inheriting the font size, since we have a base-anchor in the card, we adjust the font-size value accordingly, so: - 1bem would mean 0.8em further in the card - 1blh could then mean 0.8 * 1.5em = 1.2em */ .card.card-sm { font-size: 0.8em; } Fascinating, yeah? This brings about a whole new possibility when creating reusable components. Putting it into practice today Let me preface this section with the fact that bem and blh does not exist today. So whatever implementation I can come up with is simply an imperfect stop-gap measure. Today, we are certain that we can use the em unit for such a purpose — but this requires a little bit more calculation, since em is a relative, not a base unit. The first step is to determine the base element — and the base font size — which we can do by setting the base-size property: .card { --base-size: 1em; font-size: var(--base-size); } .card-sm { --base-size: 0.8em; } We can then simulate the bem (base em) unit by dividing the intended font-size with the base-size: .card { h2 { --font-size: 2em; font-size: calc(var(--font-size) / var(--base-size)); } } Unfortunately, the above code won’t work because we can’t perform a calc() division with a unit-ed value. So the best we can do to remove the units from --base-size. When we do this, we need to perform another calc() on the base element to create the actual font-size property: .card { --base-size: 1; font-size: calc(var(--base-size) * 1em); } Then we perform the same calc() in the <h2> to create its font size: .card { h2 { --font-size: 2; font-size: calc(var(--font-size) / var(--base-size) * 1em); } } This is all starting to get a little “ugh”. Nobody wants to all these boilerplate code. So, this is best abstracted away with a mixin, or perhaps even a function. If you use Sass, you might imagine something like this: @mixin base-anchor() { font-size: calc(var(--base-size) * 1em); } If you use Tailwind, perhaps you can imagine the Tailwind utility to do the same. After all, Tailwind utilities can be seen as convenient Sass mixins. @utility base-anchor { font-size: calc(var(--base-size) * 1em); } We can then apply this utility into the base element. The code looks a little bit cleaner: .card { @apply base-anchor; --base-size: 1; } .card-sm { --base-size: 0.8; } For the <h2>, we can create another utility to perform the calculation for us. It’ll look something like this: @utility text-relative { font-size: calc(var(--text-size) / var(--base-size) * 1em); } We can then use the utility like this: .card .title { @apply text-relative; --text-size: 2; } Now, to calculate the padding of the card for the .title element, we need to reverse the font-size to get the base-size value. This is best done with a CSS function, which is not widely supported today, but hopefully, soon! @function --bem(--multiplier) { result: calc(var(--text-size / var(--base-size) * 1em * --multiplier)); } We can then use --bem to calculate the padding on the card title: .card .title { /* ... */ padding-block: --bem(0.5); padding-inline: --bem(1); } We mentioned above that the lh value works better for margin and padding since it preserves vertical rhythm. So, why not create a --blh function too? In this case, we can add a --leading variable that the function can inherit from: @function --blh(--multiplier, --lh-multiplier) { result: calc( var( --text-size / var(--base-size) * 1em * --multiplier * var(--lh-multiplier, var(--leading)) ) ); } Then we can use --blh like this: .card .title { /* ... */ padding-block: --blh(0.5); padding-inline: --blh(1); } In the spirit of today We can’t use --bem and --blh in production because CSS Functions are not available all browsers yet. In the spirit of making bem work right now, we can create a utility, that calculates the --base-font-size from the --font-size. Notice this new variable is called --base-font-size, not --base-size, since --base-size is already used. (We cannot overwrite the CSS variable.) /* I multiplied the value by 1em here to make it easy for you to use the value */ @utility base-font-size { --base-font-size: calc(var(--base-size) / var(--font-size) * 1em); } We can also create a utility called base-line-height to get the value of the line-height. When we do this, it’s much easier if we also pass in a --leading variable: @utility base-line-height { --base-leading: calc(var(--base-font-size)* var(--leading)); } Then we can use calc on --base-leading to get the values we want: .card .title { @apply text-relative; @apply base-font-size; @apply base-line-height; --font-size: 2; padding-inline: var(--base-line-height); padding-block: calc(var(--base-line-height) * 0.5); } Putting it all together Let’s first put together the necessary utilities and functions to make this happen today: /* The necessary utilities */ @utility base-anchor { font-size: calc(var(--base-size) * 1em); } @utility text-relative { font-size: calc(var(--font-size) / var(--base-size) * 1em); } /* To use this today */ @utility base-font-size { --base-font-size: calc(var(--base-size) / var(--font-size) * 1em); } @utility base-line-height { --base-line-height: calc(var(--base-font-size)* var(--leading)); } /* Easier usage when CSS Functions become available */ @function --bem(--multiplier) { result: calc(var(--font-size / var(--base-size) * 1em * --multiplier)); } @function --blh(--multiplier, --lh-multiplier) { result: calc( var( --font-size / var(--base-size) * 1em * --multiplier * var(--lh-multiplier, var(--leading)) ) ); } Now here’s the .card code to achieve the functionality in Tailwind we were talking about. You can see it at work here. /* What we can actually use today */ .card { @apply base-anchor; --base-size: 1; --leading: 1.5; > * { padding: 1lh; } .title { @apply text-relative; @apply base-font-size; @apply base-line-height; --font-size: 2; padding-inline: var(--base-line-height); padding-block: calc(var(--base-line-height) * 0.5); } } .card-sm { --base-size: 0.8; .title { --font-size: 1.2; } } /* What we can use when CSS Functions are available */ .card { @apply base-anchor; --base-size: 1; > * { padding: calc(--blh(1)); } .title { @apply text-relative; --text-size: 2; padding-block: calc(--blh(0.5)); } } It’s still not as pretty as the bem and blh versions I’ve shown you above, but at the very least, we achieve some sort of functionality, yeah? And it doesn’t look half bad! Using this with Splendid Labz today Splendid Styles — the branch of Splendid Labz that handles design and styles — contains the code you can use today. We also included the --bem and --blh versions if you wanna play with them as well. To use Splendid Styles, just download the library, import the base-font-size file, and do what you’ve just seen the above! npm i @splendidlabz/styles @import '@splendidlabz/styles/typography/base-font-size.css' That’s it! Now, if you’re interested in all of the tools I’m been cooking up to make web development simpler, you can grab an early bird discount for the Splendid Pro package today — this is available to all CSS-Tricks readers! (I might add a lifetime option to the Styles package as it evolves to sufficiently. But it might be a year or so before that happens.) Alright, enough promotion. Let’s come back here. What do you think about this unit between root and relative values? I hesitate to call it “base” em because “base” can mean so many things. But it also sounds right at the same time. Does bem and blh make sense to you? Do you think I’m thinking a wee bit too much for this design aspect? Maybe you’ve got a better name for this? I’d love to hear from you so please feel free to share your thoughts below! We Might Need Something Between Root and Relative CSS Units for “Base Elements” originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.
  14. Blogger posted a blog entry in Programmer's Corner
    by: Geoff Graham Tue, 12 Aug 2025 15:02:21 +0000 Sunkanmi Fafowora is a frequent flier around here. You’ve probably seen his name pop up in the CSS-Tricks Almanac and we actually just published something today that he wrote up for the color-mix() function. The guy spends a lot of time in the Almanac because he loves technical documentation, something he showed off when writing the CSS Color Functions Guide. And it’s that love for technical documentation that lead him to ship CSS-Questions (gotta love that hyphenated URL, right?!), a place where you can test your CSS knowledge with over 100 questions. You can take the comprehensive exam or a basic one with 20 questions if all you want is a pop quiz. And of course, the first question I get is related to CSS color functions! You’re just trolling me now, aren’t you Sunkanmi?! My first try was a valiant effort, I’d say… Almost perfect. Could be the title of my autobiography. CSS-Questions originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.
  15. by: Chris Coyier Mon, 11 Aug 2025 15:54:50 +0000 Ages ago, Firefox shipped “masonry layout” where you simply grid-template-rows: masonry; instead of defining specific rows in a grid or letting them auto-create. It wasn’t terribly powerful but it did the trick for a lot of use cases. There has been renewed interest in this the past year or so, where Google and Apple have competing ideas on how to do this style of layout better. Google-folk think display: masonry; is best, with a bunch of other properties controlling how it works. They’ve now shipped that behind a flag, so I think we know where their head is at. Apple-folk think we could keep it in display: grid; but introduce “Item Flow” properties, including one called item-pack which would accomplish the layout and perhaps open the door for other useful behaviors across layout styles. Three browsers, three different situations, including shipped implementations. Let’s hope this shakes out cleanly.
  16. by: Andy Clarke Mon, 11 Aug 2025 13:43:14 +0000 Block quotes and pull quotes are useful for punctuating solid blocks of running text. They’re also two of the best typographic elements for acting as visual landmarks to catch someone’s eye. There are no rules about how long a quote should be, how big it should look, or even how it’s styled. So, how do you design block quotes and pull quotes to reflect a brand’s visual identity and help tell its story? Here’s how I do it by styling the HTML blockquote element using borders, decorative quote marks, custom shapes, and a few unexpected properties. Patty Meltt is an up-and-coming country music sensation. My brief: Patty Meltt is an up-and-coming country music sensation, and she needed a website to launch her new album. She wanted it to be distinctive-looking and memorable, so she called Stuff & Nonsense. Patty’s not real, but the challenges of designing and developing sites like hers are. First, a quote-unquote “recap.” There are no limitations on how quotations can be styled. Block and pull quotes can both be eye-catching design elements, but they convey different messages. While a block quote is typically inside the content flow, a pull quote (sometimes called a callout) is extracted from the text to form a separate element. Pull quotes extracted from the text The proper HTML for marking up a block quote depends on its contents. My design for Patty Meltt includes concert reviews, which contain the reviewer’s name: <blockquote> <p>"Patty Meltt’s powerful ballads and toe-tapping anthems had the audience singing along all night."</p> <footer>— Waylon Bootscuffer</footer> </blockquote> Here, the footer contains information about the source or author of the parent element. This makes it a good fit for attributions inside a blockquote, where it indicates who wrote it. But what about cite? For years, I used the cite element to mark up attributions. It’s one of those sneaky bits of HTML that felt intuitive until I read the spec and went, “Dagnabbit!” because cite isn’t meant to label people. Instead, it should be used for: <blockquote> <p>"Patty Meltt’s powerful ballads and toe-tapping anthems had the audience singing along all night."</p> <footer>— Waylon Bootscuffer, <cite>Country Music Magazine</cite></footer> </blockquote> So, in that example, footer marks up the attribution, and cite points to the title of the publication, not the person writing it. This gives the markup a semantic boost and helps people who use screen readers. Styling with personality Out-of-the-box, browsers do very little to style blockquotes, except for adding inline margins. You could add some simple blockquote styling, but with just a little more style, you can transform them into expressive design elements that reflect a brand’s personality and voice. Quotation designs to reflect a brand’s personality and voice For Patty Meltt’s design, I wanted her quotes to feel confident, loud, and a little over the top. Tip: Interactive examples from this article are available in my lab. Borders A simple border, used well, can make block and pull quotes stand out and anchor them into a layout. A border on the left or top separates a block quote from surrounding content, helping a reader recognise it as a different voice from the main narrative. In magazines and newspapers, block quotes punctuate content blocks and are frequently styled to contrast with the surrounding text. A full-width, bordered block quote encourages a reader to pause for a moment. Block quote with left border (left) and a block quote with top border (right) It’s a simple, yet effective, way to focus someone’s attention on a message. A thin border feels quiet and understated: blockquote { padding-inline: 1.5rem; border-inline-start: 1px solid #98838e; border-inline-end: 1px solid #98838e; } Pull quotes with thin borders This may suit some brands, but that’s not a style which reflects Patty’s personality. Whereas a bolder, thicker border feels more confident, like it has something important to say: blockquote { padding-inline: 1.5rem; border-inline-start: 5px solid #98838e; border-inline-end: 5px solid #98838e; } Pull quotes with thick borders Those borders needn’t always fill the full height or width of a blockquote, so instead of using the border property, use ::before and ::after pseudo-elements to add faux borders at any size: blockquote { display: flex; flex-direction: column; align-items: center; } blockquote::before, blockquote::after { content: ""; display: block; width: 80px; height: 5px; background-color: #98838e; } Pull quote with faux borders You could even animate those faux borders using keyframe animations or simple transitions to increase their width when someone interacts with the quotation: blockquote::before, blockquote::after { content: ""; display: block; width: 80px; height: 5px; background-color: #98838e; transition: 300ms width ease-in-out; } blockquote:hover::before, blockquote:hover::after { width: 100%; } Quote marks Before choosing how to style your quote marks, consider whether you need them at all. Technically, an HTML blockquote implies its content is a quotation. So, from an accessibility and semantic standpoint, quote marks aren’t required because screen readers and search engines will recognise a blockquote. However, quote marks can visually emphasise quoted content and add interest and personality to a design. Quote marks add interest and personality Are both opening and closing marks always needed? Possibly, when a design needs a traditional feel, or a quotation appears in a passage of running text: blockquote { position: relative; padding-inline: 64px; } blockquote img:first-of-type, blockquote img:last-of-type { position: absolute; } blockquote img:first-of-type { top: 0; left: 0; } blockquote img:last-of-type { right: 0; bottom: 0; } Decorative oversized opening mark Or, to give a design an editorial feel, you might use only a decorative oversized opening mark for a pull quote, which is separate from the normal flow of text: blockquote { display: flex; flex-direction: column; align-items: center; } blockquote::after { content: ""; display: block; width: 80px; height: 5px; background-color: #98838e; } Quote marks library Block quotes don’t necessarily need quote marks, but when you use them with purpose, they become more than punctuation. They become part of the design personality. Decorative marks are ideal when a brand wants to infuse its character into a design. Poppins quote mark (left) and a Punch 3D quote mark (right) Sadly, even the nicest designed typefaces can include dull and uninspiring quote marks. So, it’s important to remember that you can choose marks from an altogether different font if they better suit a design. Part of my quote marks library That’s why, whenever I audition a new typeface, I check its quote marks. If they’re memorable or noteworthy, I add them as SVGs to my quote marks library so I can easily find them later. Shapes Quotation design needn’t stop at borders and quote marks. Block and pull quotes can be any shape. You might style an album or concert review as a speech or thought bubble, and include an avatar for the author. Or, you could use a clip-path or mask to transform a quotation into any shape you can imagine. Speech bubble, thought bubble, and blob Designing for Patty Meltt Patty Meltt wanted a website packed with design details. Every element added to a design is an opportunity to be expressive, and that includes her quotations. From the selection of designs I showed her, she felt a mixture of quote marks, avatar images, and borders — with type set in a flowing script — best suited her style. Design for Patty Meltt’s block quote (left) and pull quote (right) To implement her pull quote, I used a cursive typeface, which contrasts with the rest of her typographic design: blockquote p { font-family: "Lobster Two", cursive; font-size: 1.5rem; font-weight: 700; font-style: italic; text-transform: unset; } Then I added an SVG quote mark from the Ohno type foundry’s Blazeface type family. <div> <img src="img/blazeface-start.svg" alt="" width="48"> </div> I turned its parent division into a flex container and aligned the contents vertically: blockquote div { display: flex; align-items: center; gap: 1.5rem; } …and used generated content to add a flexible-width horizontal line to fill any remaining space: blockquote div:first-of-type::after { content: ""; display: block; flex: 1; height: 5px; background-color: #98838e; } Conclusion With a little care and creativity, block quotes can become expressive, brand-building elements, as distinctive as a logo or headline. Whether you’re working with quiet, thoughtful quotes or loud, in-your-face testimonials, styling them is an opportunity to reinforce a client’s personality and voice. Patty Meltt’s quotations became mini design statements. But the same principles apply no matter the brand: get the semantics right, choose styling that fits the tone, and don’t be afraid to experiment with borders, quote marks, and even shapes. Getting Creative With Quotes originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.
  17. by: Geoff Graham Mon, 11 Aug 2025 12:16:00 +0000 We don’t publish a big ol’ bunch of links pushing products and whatnot around here. But I do like sharing a good resource when it’s available and that’s what I’m doing here with Andy Clarke’s upcoming Practical Layout Workshop. First off, the deets: Date: Thursday, 18th September Time: 3:00 p.m. (UK) Duration: 2 hours (live, with demos and Q&A) Format: Online (join from anywhere), recording included Price: £69 You probably already know Andy pretty well. He’s been a leading voice in web design forever. He’s also written a slew of super CSS-Tricks articles recently (including this one today, with more on the way!) that are all about “getting creative” with common UI patterns while leveraging CSS to embrace a healthy dose of whimsy. Here’s what he had to say to me about the workshop: Just get a whiff of the stuff he’s been digging into: Article on Jun 3, 2025 Getting Creative With HTML Dialog dialog Andy Clarke Article on Jul 18, 2025 Getting Creative With Versal Letters initial-letter inspiration typography Andy Clarke Article on Jan 27, 2025 Revisiting CSS Multi-Column Layout columns layout Andy Clarke Article on Mar 21, 2025 Revisiting CSS border-image border Andy Clarke Article on Apr 30, 2025 Revisiting Image Maps images Andy Clarke And when you pair that with the Toon Title demos he’s been publishing, you get a really good idea of the clever ideas and solid techniques you’ll take away from this workshop. Oh, and CSS-Tricks readers can get in at a £5 discount with coupon code FRIEND5 (that’s the number 5 at the end) at checkout. 😉 Stuff & Nonsense Practical Layout Workshop originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.
  18. by: Sourav Rudra Sun, 10 Aug 2025 02:10:04 GMT There's something special about playing co-op games with your friends. If done right, it can create unbreakable bonds that last forever. But it can also weed out the fake ones who steal your loot while you're downed and conveniently "forget" to revive you. Source for that? Me, and countless hours of discovering which people are actually sociopaths in disguise. 😆 Whether you're strengthening friendships or testing new ones, co-op gaming on Linux has never been better. The 15 games in this list are the best choices for shared adventures. 📋The games featured here are of different age ratings, and are a mix of native Linux titles and those that run well via Proton. Also, these games might be available from other Platforms like GOG.1. Unravel TwoSteam Deck status: Playable 🟡 Unravel Two puts players into a beautiful cooperative experience where two adorable yarn creatures called Yarnys work together to overcome obstacles. Both players control a Yarny and their companion as they swing, climb, and solve environmental puzzles through remarkable natural landscapes. The game requires collaborative play, as many puzzles cannot be solved alone, nudging players to communicate and coordinate their movements. The emotional storytelling unfolds wordlessly throughout the environment, creating touching moments as the two characters help each other through challenging situations. 📋Why this game? It perfectly balances accessibility with meaningful cooperation, offering a relaxing yet engaging experience that works equally well for couples, friends, or family gaming sessions.Unravel Two2. PEAKSteam Deck status: Playable 🟡 PEAK is an innovative climbing simulation that brings the thrill and challenge of mountaineering to cooperative gameplay. Players work together to plan routes, manage equipment, and support each other through treacherous ascents on realistic mountain faces. You won't get anywhere in this game if you don't cooperate with your friends, as one wrong move can negatively impact the whole team. Weather conditions, equipment management, and stamina all play crucial roles in successful climbs. The realistic physics and new mountain environments (that change every 24 hours) create an immersive experience that captures both the beauty and dangers of extreme climbing. 📋Why this game? It offers a unique cooperative experience that's unlike anything else, combining realistic climbing mechanics with practical teamwork.PEAK3. Valheim [Native Linux]Steam Deck status: Verified ✅ Valheim drops up to 10 players into a procedurally generated Viking purgatory where cooperation isn't just helpful; it's essential for survival. This Norse-inspired survival game combines base building, exploration, and combat in a beautifully stylized world. The game shines in its progression system, where different biomes present unique challenges that require coordinated preparation and teamwork. Building impressive settlements, crafting advanced equipment, and taking down powerful bosses all benefit from having dedicated teammates handling different roles. 📋Why this game? It cleverly blends survival mechanics with meaningful progression, creating a world where every shared accomplishment feels earned.Valheim4. PhasmophobiaSteam Deck status: Verified ✅ Phasmophobia will make your dream of becoming a demonologist true, at least until you're screaming like a child and abandoning your teammates to save yourself from an angry ghost. In this, up to four players work together as paranormal investigators, using specialized equipment to identify supernatural entities while trying not to become victims themselves. The game's genius lies in how it makes every player essential, someone needs to monitor cameras, another handles EMF readings, while others navigate the haunted locations to gather evidence. 📋Why this game? It creates genuine scares rather than cheap jump scares, making every investigation a memorable shared experience.Phasmophobia5. American Truck Simulator [Native Linux]Steam Deck status: Verified ✅ American Truck Simulator transforms long-haul trucking into a surprisingly engaging cooperative experience through its multiplayer convoy features. Players can form trucking companies, coordinate deliveries, and explore the meticulously recreated American highways together. The game offers a relaxing experience where players can chat while cruising down scenic routes, coordinate convoy formations, or work together to complete challenging deliveries. If you don't like the American setting, then you can go for Euro Truck Simulator 2, which is set in Europe. I can vouch for both of these games; they are very addictive. 📋Why this game? It provides a chill, meditative experience that's perfect for catching up with friends while exploring beautiful virtual recreations of the American landscape.American Truck Simulator6. HELLDIVERS 2Steam Deck status: Playable 🟡 Want to make democracy great again? HELLDIVERS 2 delivers chaotic cooperative action where up to four players fight for "Super Earth" against undemocratic alien threats. This shooter calls for strategic coordination, where accidentally calling in orbital strikes on teammates is just part of the hilarious (and intense) experience. Here, every mission feels like a desperate fight for survival where success depends entirely on how well the team works together under pressure. 📋Why this game? It perfectly captures the intensity of tactical cooperation while maintaining a satirical tone that makes every friendly fire incident memorable rather than frustrating.HELLDIVERS 27. Barotrauma [Native Linux]Steam Deck status: Playable 🟡 Barotrauma plunges players into the crushing depths of Europa's ocean, where up to 16 players can team up inside a submarine in a fight for survival against alien creatures and human incompetence. This survival game combines submarine simulation with horror elements and unconventional storytelling. Every crew member has specific roles, like Captain, Engineer, Medic, Security, and the submarine's survival depends on each player performing their duties competently. When things go wrong (and they will), the results are often spectacular failures involving hull breaches, reactor meltdowns, and alien infestations. 📋Why this game? Every trip becomes a wild story of either pulling off miracles or spectacularly screwing everything up. You'll be laughing about the events that happen in this for years.Barotrauma8. It Takes TwoSteam Deck status: Verified ✅ It Takes Two is specifically designed as a cooperative experience that cannot be played alone, following a couple navigating both their relationship and bizarre worlds filled with creative gameplay mechanics. Every level introduces new cooperative mechanics that require both players to work in perfect harmony. The game constantly surprises players with its variety; one moment you're operating asymmetric tools to solve puzzles, the next you're engaging in competitive mini-games that lighten the mood. 📋Why this game? It's the perfect couples' game that uses cooperation as both a gameplay mechanic and a metaphor for relationships, creating meaningful shared experiences through creative game design.It Takes Two9. Sons of The ForestSteam Deck status: Unsupported 🚫 Sons of The Forest combines survival horror and cooperative mechanics, where up to 8 players work together to survive a cannibal-infested island. Here, you build shelters, craft weapons, and uncover dark secrets while trying not to become dinner. The game naturally creates team roles, like builders, resource gatherers, and brave souls who venture into dark caves. Having backup makes the horror slightly more bearable, though you'll still jump at every creepy sound together. 📋Why this game? It combines survival mechanics with tasteful horror in a way that makes cooperation feel essential rather than optional.Sons of The Forest10. R.E.P.O.Steam Deck status: Playable 🟡 R.E.P.O. sends you and your crew into haunted locations to hunt for valuable loot while dealing with angry spirits that don't appreciate trespassers. It's part treasure hunting, part ghostbusting. Teams need to coordinate between searching for valuables and handling supernatural threats that get increasingly hostile. Communication is key when you're trying to grab loot while your teammate is getting chased by a poltergeist. 📋Why this game? It combines the thrill of treasure hunting with paranormal combat, creating tense moments where greed might just get your whole team killed by ghosts.R.E.P.O.11. Unrailed! [Native Linux]Steam Deck status: Verified ✅ Unrailed! transforms railroad construction into a frantic cooperative puzzle game where up to four players must work together to build tracks for an unstoppable train. The procedurally generated landscapes require constant adaptation and perfect coordination to avoid derailment. The game creates natural chaos where everyone has a different job, like chopping wood, laying tracks, clearing obstacles, or keeping the train from flying off the rails. As levels progress, everything gets faster and more hectic. 📋Why this game? It perfectly captures the satisfaction of successful teamwork under pressure, creating those "we did it!" moments when your coordinated efforts barely save the train from certain doom.Unrailed!12. Dead by DaylightSteam Deck status: Verified ✅ Dead by Daylight puts four survivors against one killer in a deadly game of cat and mouse where teamwork literally means life or death. Survivors must coordinate generator repairs, healing, and rescues while avoiding becoming the killer's next victim. The real trick here is from those split-second decisions: Do you risk saving your teammate on the hook or prioritize your own survival? Every choice matters, and bad teamwork usually ends with everyone dead. 📋Why this game? It creates genuine heart-pounding moments where your friends' survival depends on your decisions, making every match a test of loyalty under pressure.Dead by Daylight13. Schedule ISteam Deck status: Playable 🟡 Fans of Breaking Bad (and Better Call Saul), I have something special for you. Schedule I is a chill cooperative experience focused on manufacturing narcotics where players work together to handle complex operations through careful planning and coordination. You'll be juggling resources, keeping supply chains running, and making sure nothing falls apart while your friends handle their own share of the work. 📋Why this game? You get to start a fictional illicit empire with your friends; all the planning and coordination thrills without any real-world consequences (e.g., jailtime).Schedule I14. Deep Rock GalacticSteam Deck status: Playable 🟡 Deep Rock Galactic combines space dwarves, mining operations, and alien bug extermination into one of the most polished cooperative experiences available for Linux. Up to four players take on different roles: Driller, Engineer, Gunner, or Scout, each with unique tools essential for mission success. The procedurally generated cave systems ensure every mission feels fresh, while the class-based gameplay creates natural cooperation as each dwarf's abilities complement the others perfectly. The game's progression system rewards both individual skill development and team coordination, with a steady stream of upgrades and customization options. 📋Why this game? It nails the fundamentals of cooperative gameplay with distinct classes, excellent progression systems, and the perfect balance of challenge and fun.Deep Rock Galactic15. Warhammer 40,000: Space Marine 2Steam Deck status: Playable 🟡 Warhammer 40,000: Space Marine 2 drops you and two friends into a grim future as superhuman Space Marines, fighting endless alien hordes. You're basically walking tanks with chainswords and big guns, and the game makes you feel every bit as overpowered as that sounds. The combat rewards aggressive teamwork where you charge headfirst into massive enemy swarms while covering each other's backs. When someone goes down, you better believe you're fighting through hell to revive them. 📋Why this game? It perfectly captures the power fantasy of being an unstoppable warrior while still requiring tight coordination to survive the galaxy's worst nightmares.Warhammer 40,000: Space Marine 2I let you enjoy and explore these games. Meanwhile, if you have suggestions on some interesting games or you found a new favorite here, please leave a comment.
  19. by: Shivam Bhalla Fri, 08 Aug 2025 13:42:31 +0000 If you landed on this article, chances are you might have a front-end interview coming up, perhaps one with a focus on CSS, or you are in the market to start preparing for CSS-related interviews altogether. Depending on the exact role you are interviewing for, it’s unlikely that you will only be asked questions about CSS. Typically, you will encounter a combination questions covering things like HTML, CSS, and JavaScript. For this article, we will focus primarily on a set of 10 CSS questions you likely will encounter in front-end interviews, even if they get grouped with HTML or JavaScript. And to be clear, these may or may not be the “best” questions for an interviewer to ask, but what you are likely to see, based on my experience as the founder of frontendlead.com, an all-in-one platform to help front-end engineers prepare for big tech interviews. I have been a software engineer for over 13 years and have been on both ends of hundreds of interviews. The questions cover different levels of difficulty. To keep things simple, we will start with the “easiest” questions and end with the “hardest” ones. #Interview QuestionDifficulty1How would you go about building a responsive website?Easy2What are CSS preprocessors, and why are they useful?Easy3How would you make fonts responsive in CSS?Easy4Describe z-index and how stacking context is formed.Medium5What’s the difference between block, inline, and inline-block?Medium6What does * { box-sizing: border-box; } do?Medium7How would you go about making an image responsive in CSS?Medium8How would you make CSS more performant?Hard9What are the pros and cons of CSS in JS vs external CSS import, and which would you choose?Hard10Can you build this layout in CSS?Hard Before we dive in, I’d like to say that there are many ways to correctly answer the same question. Everything I’m providing here is merely guidance for approaching the types of questions you may face in an interview. The actual questions you encounter may need more elaboration in a particular area or require specific examples that demonstrate your understanding of different concepts. 1. How would you go about building a responsive website? (Easy) Responsive design is one of the fundamentals you’ll be asked about. Building a responsive website means your layout, images, and typography adapt gracefully to any device or screen size. The basic tools for responsive design include relative units (such as %, em, and rem), media queries, and fluid layouts. Most interviews expect you to mention a “mobile-first” approach, where your base styles are designed for mobile devices and scaled up for larger screens. A quick code example using media queries: /* Main container for your page content, centered and with a max width for larger screens */ .container { max-width: 1200px; /* Prevents content from stretching too wide on large displays */ margin: 0 auto; /* Horizontally center the container */ padding: 16px; /* Adds space inside the container */ } /* Make all images scale with their parent container */ img { max-width: 100%; /* Image will never be wider than its container */ height: auto; /* Keeps the aspect ratio intact */ display: block; /* Removes extra space below images (inline images have baseline spacing) */ } /* Responsive styles for small screens (phones, small tablets) */ @media (max-width: 600px) { .container { padding: 8px; /* Reduce padding to save space on smaller screens */ } /* Example: Stack nav links vertically on small screens nav ul { flex-direction: column; } */ } You should also mention how you handle navigation and images on mobile devices (such as collapsing navigational menus or leveraging responsive image techniques), as well as how to test layouts using browser Developer Tools. 2. What are CSS preprocessors, and why are they useful? (Easy) CSS preprocessors, such as Sass, Less, and Stylus, make writing and maintaining large CSS codebases significantly easier. They add features that aren’t in vanilla CSS, such as mixins, and functions — although those lines are becoming more blurred as CSS ships similar features, such as variables, nesting, and yes, mixins and functions. Mixins and functions enable you to reuse common patterns and even generate code based on parameters. Here’s an example in Sass: // Mixin: For a common box shadow you want to reuse @mixin shadow($opacity: 0.12) { box-shadow: 0 2px 8px 0 rgba(24, 39, 75, $opacity); } // Function: Calculate a spacing value for consistent margins and padding @function space($multiplier: 1) { @return $multiplier * 8px; } // Placeholder selector: For base button styles to extend %btn-base { display: inline-block; font-size: $font-size-lg; border-radius: 6px; text-align: center; cursor: pointer; } // Partial import: Example (would be in _variables.scss) // @import 'variables'; // Button styles using everything above .button { @extend %btn-base; // Use base button styles background: $primary; color: #fff; padding: space(1.5) space(3); // Use the custom function for spacing @include shadow(0.15); // Use the mixin for shadow // Nested selector for hover state &:hover { background: lighten($primary, 10%); } // Modifier class (e.g., .button.secondary) &.secondary { background: $secondary; color: #23272f; border: 2px solid $secondary; } // Nested media query (for responsive buttons) @media (max-width: 600px) { padding: space(1) space(2); font-size: 1rem; } } Preprocessors help keep your codebase DRY (Don’t Repeat Yourself) and make refactoring less painful. While CSS now has native variables (--variable), preprocessors are still widely used for their advanced features. This is a good opportunity to demonstrate your understanding of modern CSS as well since CSS now supports nesting and work on functions is underway (and indeed are already planned for Chrome 139). 3. How would you make fonts responsive in CSS? (Easy) Font sizing is a common interview topic because it affects both design and accessibility. Responsive fonts adjust to screen size, ensuring your text remains readable. The classic approach is to use relative units, such as em (scoped to the parent element) and rem (scoped to the root element). Newer CSS features makes this even easier and more flexible with the clamp() function and viewport units (vw and vh). You can also use media queries to step up font sizes for larger screens. Here are some practical examples: /* Basic responsive text using rem (scales with root html font size) */ body { font-size: 1rem; /* 1rem is typically 16px, but can be increased for accessibility */ } /* Use rem for headings so they scale with user/browser settings */ h1 { font-size: 2.5rem; /* 2.5 × root font size */ line-height: 1.2; } /* Modern fluid sizing with clamp and viewport units */ h2 { /* Font size is at least 1.5rem, scales with viewport up to 3rem */ font-size: clamp(1.5rem, 4vw, 3rem); } /* Using viewport width units directly */ h3 { font-size: 6vw; /* 6% of viewport width (can get very large/small on extremes) */ } /* Responsive font-size using media queries (manual step-up) */ p { font-size: 1rem; } @media (min-width: 600px) { p { font-size: 1.2rem; } } @media (min-width: 1200px) { p { font-size: 1.4rem; } } rem/em units make your text scale with the root or parent font size, making them more responsive to changes. clamp() lets you set a minimum, fluid, and maximum font size at once (e.g., clamp(1.5rem, 4vw, 3rem) ensures the font size never falls below 1.5rem or exceeds 3rem, scaling smoothly in between). Viewport units (vw, vh) make fonts fluid relative to the screen width or height. Media queries enable fine-tuning of font size for various devices and breakpoints. Absolute px units are usually avoided for body text, as they don’t scale for users who adjust browser settings for accessibility. Speaking of accessibility, it’s worth calling out that extra consideration needs to go into the possibility of the user zooming into the page. 4. Describe the z-index property and how stacking context is formed. (Medium) Thez-index property determines which elements appear on top of others, but it only works on elements that have a positioning context, such as position: relative, absolute, or fixed. A stacking context is an environment where stacking and rendering order is controlled. New stacking contexts can be created by elements with specific properties, such as position with a z-index, or CSS properties like opacity less than 1, transform, or filter. Understanding stacking context is essential for UI components like drop-downs, modals, and tooltips. Here’s an example demonstrating a stacking context created by a parent element element that contains two children that stack one on top of the other, ordered by z-index: /* The parent creates a new stacking context by having position and z-index */ .parent { position: relative; /* Triggers a positioning context */ z-index: 2; /* This parent will stack above siblings with lower z-index values */ width: 300px; height: 200px; background: #b3e6fc; margin: 32px; } /* The child is absolutely positioned inside .parent */ .child { position: absolute; /* Needed for z-index to work */ top: 40px; left: 40px; width: 200px; height: 100px; background: #4f46e5; color: #fff; z-index: 10; /* Relative to its parent's stacking context, not the whole page */ display: flex; align-items: center; justify-content: center; } /* Another sibling element at the root level for comparison */ .sibling { position: relative; z-index: 1; /* Lower than .parent, so .parent stacks on top */ width: 320px; height: 140px; background: #fca311; margin: -80px 0 0 220px; /* Overlap with .parent for demo */ display: flex; align-items: center; justify-content: center; color: #23272f; } If you have ever run into an issue where z-index isn’t behaving as you expect, check if there’s an unexpected stacking context due to a parent element. 5. What’s the difference between the display property’s block, inline, and inline-block values? (Medium) When you’re asked about the difference between the display property’s block, inline, and inline-block values in CSS, remember that they determine how elements are displayed in the document flow. Block elements always start on a new line and take up the full width of their parent container, regardless of their actual content. Examples include <div> and <p>. Inline elements flow within a line of text, only occupying as much width as needed for their content; you cannot set their width or height. Examples include <span> and <a>. Inline-block elements combine the behaviors of both inline and block elements: They flow inline with text (without forcing a new line), but you can set their width and height like a block element, which makes them especially useful for custom buttons or navigation items. Display ValueStarts New Line?Width/Height Settable?Example ElementsblockYesYes<div>, <p>, <h1>inlineNoNo<span>, <a>, <strong>inline-blockNoYesCustom buttons, images, icons 6. What does box-sizing: border-box do? (Medium) By default, CSS uses the content-box model, which means that width and height only apply to the content, excluding padding and border. box-sizing: border-box changes this so that width and height include the padding and border, making sizing more predictable. Here’s an example of how that might be demonstrated in CSS: /* Apply border-box sizing to all elements and their pseudo-elements */ *, *::before, *::after { box-sizing: border-box; /* Width and height now include padding and border */ } /* Demo: Without border-box (the default, content-box) */ .box-content { box-sizing: content-box; width: 200px; padding: 20px; border: 4px solid #2563eb; background: #f0f4ff; margin-bottom: 16px; /* The real rendered width will be: 200px (content) + 40px (padding) + 8px (border) = 248px */ } /* Demo: With border-box */ .box-border { box-sizing: border-box; width: 200px; padding: 20px; border: 4px solid #16a34a; background: #e7faed; /* The rendered width will be exactly 200px, since padding and border are included in the width */ } With border-box, you avoid the classic issue where adding padding or a border makes your boxes overflow their parent or break your layout. It’s now a standard best practice. You can even say that Chris Coyier has deemed February 1 “International box-sizing Awareness Day” which totally should be a real thing. 7. How would you go about making an image responsive in CSS? (Medium) This is a deceptively hard question because responsive images is a topic big enough for an entire guide. The classic approach is to ensure that photos never exceed the width of their container. For most cases, that means setting a max-width on the image element and ensuring it maintains it’s proportions: /* 1. Make images responsive to their container width */ img { max-width: 100%; /* Prevents the image from overflowing its parent */ height: auto; /* Maintains aspect ratio */ display: block; /* Removes bottom whitespace that inline images have */ } For images that need to maintain a specific aspect ratio (like a 16:9 video thumbnail), you can use the padding-bottom trick: /* 2. Maintain a specific aspect ratio (e.g., 16:9) using the padding-bottom trick */ .responsive-img-container { position: relative; /* Needed for absolutely positioning the img */ width: 100%; /* Full width of the parent container */ padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */ overflow: hidden; /* Ensures image doesn’t overflow container */ } .responsive-img-container img { position: absolute; /* Take the image out of the normal flow */ top: 0; left: 0; width: 100%; /* Stretch to fill container */ height: 100%; /* Stretch to fill container */ object-fit: cover; /* Ensure the image covers the area, cropping if needed */ } Modern CSS also has the aspect-ratio property for this: /* 3. Use the aspect-ratio property for a cleaner approach (modern browsers) */ .aspect-ratio-img { aspect-ratio: 16 / 9; /* Maintain 16:9 ratio automatically */ width: 100%; height: auto; display: block; } Responsive images often use the HTML srcset attribute and the <picture> element as well for high-DPI and various screen sizes. There’s an entire CSS-Tricks guide on those features. And, of course, there are performance considerations to take into account because the goal is to serve the best image format and size to the right device. 8. How would you make CSS more performant? (Hard) CSS performance is crucial for delivering fast and smooth experiences, especially on large-scale websites or applications. Poor CSS practices can slow down page loads, increase rendering times, and make maintenance harder. There are several strategies you can use to keep your CSS efficient and your site responsive. At the same time, CSS is often not the source of performance bottlenecks. It certainly contributes to it, but performance is a more nuanced field where many factors most certainly influence performance than CSS. 1. Minimize your bundle size Large CSS files slow down initial page loads. Removing unused CSS (also called “dead code elimination”) can significantly reduce file size. Tools like PurgeCSS, UnCSS, or the built-in features of frameworks like Next.js and Tailwind can scan your HTML/JSX and only keep styles that are used. 2. Split and lazy-load CSS Instead of shipping all CSS at once, split your styles by page or feature (“code splitting”). Modern bundlers (such as webpack and Vite) and frameworks (like React, Vue, and Next.js) support the dynamic import() feature, allowing only the CSS required for the current route or component to be loaded. // Dynamically load styles when the page loads import("./styles/page.css"); This technique improves “first paint” times and reduces bandwidth, especially for users who never visit certain pages. 3. Use simple, shallow selectors Browsers read CSS from right to left and evaluate deeply nested or complex selectors more slowly. For best performance, use flat selectors like .btn instead of something like .header nav ul li a.active. 4. Minify and compress CSS Before deploying, always minify your CSS using tools like cssnano or clean-css. Gzip or Brotli compression (handled by your server or CDN) will further shrink the payload sent to users. 5. Use critical CSS (or not!) Critical CSS refers to inlining the minimal CSS required for above-the-fold content in the initial HTML. This allows the browser to render the visible part of the page immediately, while loading the rest of the CSS asynchronously. I’d say this is a nice-to-have sort of thing, as it is a fragile and difficult strategy to implement and maintain. 6. Reduce the use of expensive properties Specific CSS properties, such as heavy box shadows, filters, or animations on significant elements, can cause “repaints” and slow down rendering. Use these effects thoughtfully, and prefer transform and opacity for animating elements — the browser’s compositor can often optimize these. 7. Avoid !important and overly specific selectors Frequent use of !important and particular selectors can make your CSS hard to override and debug, leading to more duplicated or conflicting rules. 8. Optimize unused CSS Let’s face it. As a site is iterated, CSS often becomes larger, not smaller. Styles that were relevant at one point are superseded by new ones without fully replacing the older styles, often for fear of introducing unexpected changes in unknown places. We have lots and lots of tools for detecting and removing unused CSS. There are limitations and possible trade-offs, of course, so your mileage may vary. There there’s the case of UI kits or component libraries that import numerous unused styles. It’s easy (and maybe even tempting) to use all of the styles provided by a framework, but try importing only what you need, or use tree-shaking to strip unused parts. Many frameworks allow you to configure exactly what you need, like Bootstrap does. 10. Audit CSS regularly Modern browser DevTools (like Chrome’s Coverage tab, Performance panel, and Rendering panel) let you see which styles are used on a page, helping you identify and remove dead code. There are online tools as well, like the Specificity Visualizer, CSS Specificity Graph Generator, and CSS Stats. You can find more information on these and more in “Tools for Auditing CSS”. 9. What are the pros and cons of CSS-in-JS vs. external CSS imports, and which would you choose? (Hard) CSS-in-JS may not be the hot topic it was a few years go, but you’re still very likely to see it pop up in an interview. It’s not so much your duty to rail for or against it, but demonstrate your understanding of the concept and how it compares to external CSS imports. Here’s how I would break it out. CSS-in-JS (like styled-components, Emotion, or Stitches) ProsConsStyles are scoped to components, preventing unwanted side effects.Adds runtime overhead and may increase JS bundle size.Dynamic styling based on component state or props.Styles may not appear immediately on server-rendered pages without extra setup.Easy to maintain styles close to your component logic.It can be harder to debug in the browser inspector. External CSS imports (classic .css files, global or CSS Modules): ProsConsCSS is loaded by the browser in parallel, allowing for faster rendering.Risk of style collision in global CSS.Easier to cache and split CSS for large projects.Less dynamic—harder to do conditional styles based on state.Great for global themes, resets, or utility classes. In practice, most modern teams use a combination of global styles and resets in CSS files, along with component-level styles using CSS-in-JS or CSS Modules. 10. Can you build this layout in CSS? (Hard) You’ll almost always be asked to build layouts on the fly. Remember, a question like this is a great opportunity because there’s more than one way to solve it. In this case, we’re looking at a pretty classic “Holy Grail” layout, something Geoff has written about before and demonstrated various ways to go about it using CSS Grid. You could go with a Flexbox approach as well: CodePen Embed Fallback It would be easy to fall into the trap of finding the “best” solution, but this perhaps is one case where demonstrating how to think like a front-end web developer is equally, if not more, important than coming up with a single definitive solution. Conclusion These are merely example of the sort of core CSS questions you’re likely to encounter in front-end interviews, along with practical examples and the reasoning behind each approach. If you’re comfortable answering these in depth and can code out the examples under time pressure, you’ll be well-prepared. For more front-end interview questions, consider exploring frontendlead.com, which helps you prepare for front-end interviews across top tech companies. If you have additional topics you’d like to see covered or encounter tricky interview questions, please feel free to post them in the comments — I’d love to see them. And, of course, best of luck in your interviews! How to Prepare for CSS-Specific Interview Questions originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.
  20. by: Abhishek Prakash Fri, 08 Aug 2025 17:09:15 +0530 The most talked about story this week was the instance of AWS deleting a 10-year old user account of an open source developer. The developer claims that it was a script ran by AWS employees that did this job. Awkward, right? AWS deleted my 10-year account and all data without warningAfter 10 years as an AWS customer and open-source contributor, they deleted my account and all data with zero warning. Here’s how AWS’s ‘verification’ process became a digital execution, and why you should never trust cloud providers with your only copy of anything.Seuros BlogAbdelkader BoudihSpeaking of awkward things, I could not complete the next chapter of AWK series. Sorry for that. It will be resumed next week. For a single payment, you get the paid membership to download all 6 ebooks and access all premium 7 courses. No recurring payment, you pay just once and enjoy forever. The first 50 lifetime members get it for just $99 instead of $139. We have 41 so far. The discounted lifetime membership ends on 14th August. Get Lifetime membership for just $99 (instead of $139)       This post is for subscribers only Subscribe now Already have an account? Sign in
  21. by: Ani Thu, 07 Aug 2025 10:17:25 +0000 Stay curious, and do not hesitate to try new things, especially when they seem difficult. That’s often where the greatest growth happens. About meI’m Ikhlas Jenfi, a Software Test Engineer at Etteplan. Originally from Morocco, I’ve spent the last eight years building both a life and a career in Finland. I hold a Bachelor’s degree in ICT, with a specialization in embedded systems, and a Master’s degree in ICT, focused on digital healthcare. I’ve always been curious about how technology works and how it can be used to improve people’s lives. What initially drew me to embedded systems was their practical, hands-on nature and their close connection to hardware. I enjoyed seeing how software interacts directly with physical components; it felt very tangible and impactful. Later, during my studies, I became increasingly interested in how technology was being used to transform the healthcare sector. Seeing real-world examples of medical devices and digital health solutions making a difference in patient care really resonated with me. And this eventually led me to specialize in digital healthcare during my Master’s degree. It combined both my technical interests and a sense of purpose, as the technologies could potentially improve, or even save, lives. In hindsight, there was not one single defining moment — rather, it was a gradual realization shaped by both academic exposure and a personal desire to contribute to meaningful, real-world solutions that inspired me to specialize in health technology. My Career in TechLanding my first job in IT was a challenging yet rewarding journey, especially as it occurred during the beginning of the COVID-19 period, when the job market was highly competitive and uncertain. I spent a lot of time applying to numerous positions and going through multiple interview processes without success, which at times felt discouraging. Eventually, I got the opportunity to join Etteplan. The interview process gave both the team and the customer a chance to understand my background, technical strengths, and how I approach problem-solving. I was fortunate that everything aligned well, and I was offered the position — my first real break into the IT industry. What I learned from this experience was the value of persistence, preparation, and staying open to feedback. Each interview — successful or not — helped me improve my communication and technical skills. I also realized the importance of aligning with a company’s and customer’s expectations, not just in terms of skills, but also mindset and adaptability. Ikhlas Jenfi, Software Test Engineer, Etteplan Thriving at EtteplanFor the past four years, I have been working at Etteplan as a Software Test Engineer. My daily work involves designing, executing, and automating tests to ensure our software performs as expected and meets quality standards. I enjoy analyzing, solving problems, and working with technologies that have real-world impact. The most satisfying part of my role is identifying and solving issues early. I also really enjoy collaborating across teams and seeing how all the pieces of a project come together. One of the biggest challenges in my role is keeping up with rapidly evolving tools, methodologies, and technologies. That is a constant challenge that I believe almost everyone in tech can relate to — the landscape is constantly changing. Personally, I’ve found that the key is to shift from a mindset of catching up to a mindset of continuous curiosity. Instead of trying to master everything at once, I focus on building a strong foundation in core concepts, which helps me adapt faster when new tools or frameworks come along. I also make a habit of regular learning in small doses, whether it’s reading documentation, experimenting with a side project, or watching short technical videos. I have also learned not to be afraid of not knowing something. In tech, no one knows everything. What matters is being willing to learn, ask questions, and adapt. Embracing this mindset has made any change feel less threatening and more like an opportunity. Working at Etteplan has been a rewarding experience. I have had the chance to work on meaningful, challenging projects while being supported by a team of talented and approachable colleagues and management. What I value most is the company’s culture of collaboration and continuous learning. Etteplan actively supports us in adopting new technologies and encourages skill development by giving us access to courses, webinars, and internal knowledge-sharing competence groups. On top of that, we are given two hours per week specifically for personal development — a benefit that really motivates me to stay curious and grow. This commitment to learning goes hand in hand with a culture that encourages exploration and trying out new tools. Colleagues are approachable and always willing to share their experiences, which makes continuous learning a natural part of the work environment. Growing Through ExperienceSome of the most valuable skills in my career have been problem-solving, analytical thinking, and communication. These skills didn’t come from textbooks; they came from true trial and error, the feedback that followed, and also from simply staying naturally curious. Supporting Women in TechI believe it starts with visibility and encouragement early on to get more girls and women into technological fields . If more young women saw role models in tech — especially those who show that working in the IT field is not only about coding , but also about creativity, impact, and problem-solving — they might feel more inspired to pursue it. I know I would have benefited from seeing more of this when I was younger. Despite challenges the industry faces with inclusion and retention, what keeps me in tech is the feeling that my work matters. I also enjoy the constant learning and the evolving nature of the field. Beyond the CodeOne of the most enriching experiences in my journey has been moving to a new country, studying and working in a second language, while learning to navigate different cultures. Living and building my career in Finland has given me incredible opportunities for both personal and professional growth. Beyond expanding my technical skills, this experience has also helped me build resilience, adaptability, and empathy — qualities that continue to shape how I approach challenges and collaboration in tech. Learning to connect across languages and cultures has influenced how I approach teamwork, communication, and problem-solving. These soft skills are just as essential in tech as technical knowledge, as they help build more inclusive, innovative and collaborative environments. I’m especially passionate about seeing more support systems in place for women from diverse backgrounds, not just to help them enter the industry, but to ensure they feel valued, supported and empowered to thrive. My Advice to YouStay curious, and do not hesitate to try new things, especially when they seem difficult. That’s often where the greatest growth happens. Tech moves fast, the reality is that everyone is constantly learning — and that’s completely normal. Ask questions, make mistakes, and reach out to others. You don’t have to do it alone. Having a strong support system or finding a good mentor can make a big difference – not just in your career, but in how empowered and ready you feel to take on new challenges every day. One thing I wish I had realized sooner is that not having all the answers doesn’t mean you have failed. You do not have to prove yourself by figuring everything out on your own, and you can always ask for help. Asking for help is a sign of strength, not weakness, and it is exactly how you grow! Some of the best learning happens when you collaborate and allow others to support you. Final ReflectionsI’m proud of the path I’ve taken and hopeful that more women, especially from diverse backgrounds, will see themselves in this field. Tech needs all voices and perspectives to truly innovate and solve the challenges of tomorrow. There’s room for all of us to grow, contribute, and thrive, and together, we can build a more inclusive and inspiring industry. The post Role Model Blog: Ikhlas Jenfi, Etteplan first appeared on Women in Tech Finland.
  22. by: Abhishek Prakash Thu, 07 Aug 2025 05:11:49 GMT You own nothing in this digital age. Your ebooks, your games, your movies. Nothing belongs to you if you rely on a third-party streaming/storage/service provider. In a bizarre turn of events, Amazon Web Services deleted the 10-year old account of an open source developer who lost all the data. AWS deleted my 10-year account and all data without warningAfter 10 years as an AWS customer and open-source contributor, they deleted my account and all data with zero warning. Here’s how AWS’s ‘verification’ process became a digital execution, and why you should never trust cloud providers with your only copy of anything.Seuros BlogAbdelkader BoudihThis again is a reminder why self-hosting and homelab are important to own your data and attain digital freedom. 💬 Let's see what else you get in this edition Arch Linux users being at risk again with another AUR infestation.Removal of wget from Ubuntu Server.Cisco gifting a project to the Linux Foundation.Teaching coding to kids.And other Linux news, tips, and, of course, memes!📰 Linux and Open Source NewsNordVPN has launched a Scam Protection Feature.Cloudflare and Perplexity are at odds with each other.Popular screenshot tool Flameshot has released a new version after three long years.Ubuntu Server will no longer have wget installed by default.Cisco has gifted the AGNTCY project to the Linux Foundation.Arch Installer 3.0.9 is here with U2F Authentication and Bluetooth support.Another RAT hits the Arch User Repository (AUR); what's going on? Arch Linux Users at Risk Again as AUR Hit by Another RATA new pest appears in the Arch User Repository.It's FOSS NewsSourav Rudra🧠 What We’re Thinking AboutLinux Foundatio is exploring different geographical territories. Outside the US, it started a Europe chapter, established Asia chapter and now it has a dedicated India chapter. The first Open Source Summit India event was just concluded, and It's FOSS was one of its official media partner, like many other Linux Foundation events in the past. Open Source Summit India 2025: Linux Foundation India Marks First Year with New PartnershipsIndia’s open source ecosystem expands with agriculture, finance, manufacturing, and AI focus.It's FOSS NewsSourav Rudra🧮 Linux Tips, Tutorials, and LearningsThere is a new Ubuntu book that aims to cover all the essentials and beyond.These 21 useful terminal shortcuts are a must for pro Linux users.If you are confused between Nextcloud and CryptPad, then our comparo should make it easier to decide.Bill's take on why systemd is deemed controversial.Watching my 4-year-old get excited about computers and coding is wonderful. ☺️ 4 Ways I am Encouraging My 4 Year Old Child to Help Learn Coding and Use ComputerYou are never too old or too young to learn programming.It's FOSSAbhishek Prakash👷 AI, Homelab and Hardware CornerA bachelor's thesis has turned out to be an alternative to Amazon Kindle. This Bachelor’s Thesis Lets You Build Your Own Kindle Alternative eBook ReaderStudent’s thesis becomes a fully hackable alternative to Amazon Kindle.It's FOSS NewsSourav RudraLofree mechanical keyboards are the new favorite these days. They are working on the new Flow 2 keyboard. Its Void variant is suprisngly silent for a mechanical keyboard. I love my Keychron keyboard, but this is something I am looking forward to. ✨ Project HighlightThis AI-powered visual editor will surprise you. Hands-On with Onlook: The AI-Powered Visual Editor That Blends Code and DesignDiscover how Onlook combines AI, code, and design effortlessly.It's FOSS NewsSourav RudraProton is taking the fight to Microsoft Authenticator with its new offering. Say Goodbye to Microsoft Authenticator! Proton Just Introduced a Solid AlternativeProton’s 2FA app helps keep your accounts safe and secure.It's FOSS NewsSourav Rudra📽️ Videos I am Creating for YouSee how you customize the new tab look in Firefox. Subscribe to It's FOSS YouTube Channel🧩 Quiz TimeWondering which desktop environment matches your vibe? Which Desktop Environment Matches Your Vibe? [Fun Quiz]See which popular desktop environment matches with your personality.It's FOSSAbhishek Prakash💡 Quick Handy TipIn GNOME, you can arrange the order of appearance of search results. Open Settings and go into the "Search" section. Here, make sure that "App Search" is enabled, and then reorder the items according to your needs. In the screenshot above, the Files result made it to the top as I had changed its priority. 🤣 Meme of the WeekThe suspense always gets me. 😑 🗓️ Tech TriviaRadio Shack unveiled the TRS-80, one of the first mass-market personal computers. With just 4KB of RAM and cassette storage, it helped launch the home computing revolution alongside the Apple II and Commodore PET. 💾💡 🧑‍🤝‍🧑 FOSSverse CornerIf you noticed a wave of spammers on our forum, this is why. Here’s Why It’s FOSS Community Forum is Being Targeted by Spammers!You folks may have seen another wave of spam accounts in the forum. Why is that? What do these spammers want? Let me tell you why this community forum is being targeted. Lately, Google search has changed and it wants to show discussions from real people in the search results. Reddit takes the top spot but many older, reputed forums have seen increased visibility in the incoming traffic from Google. It’s FOSS Community has also seen a tremendous boost in traffic. Google recognizes it as one o…It's FOSS Communityabhishek❤️ With lovePlease share it with your Linux-using friends and encourage them to subscribe (hint: it's here). Share the articles in Linux Subreddits and community forums. Follow us on Google News and stay updated in your News feed. Opt for It's FOSS Plus membership and support us 🙏 Enjoy FOSS 😄
  23. by: Chris Coyier Wed, 06 Aug 2025 18:50:41 +0000 Stephen and Chris hop on to talk about how we’re saving everyone from crashed browser tabs in CodePen’s 2.0 editor. One simple: while(true) { } Executing JavaScript can cause a browser tab to entirely lock up, preventing you from doing anything, like potentially saving your work. It can even crash other same-domain tabs. But not on our watch! CodePen is now using a “heartbeat” technique to report up from the preview iframe to the parent page, and if we don’t hear the heartbeat, we can rip out the iframe and stop the crash. But it was very tricky to get working and not too jumpy. Fortunately, we got it all working, because our previous technique of instrumenting your JavaScript wasn’t going to scale well to the 2.0 editor. Time Jumps 00:05 404 error 00:45 Dealing with infinite loops for the new editor 02:48 What happens when a browser tab freezes? 06:51 Why instrumenting worked 09:24 Alex’s heartbeat solution 14:59 How the UI works 19:10 Dealing with JavaScript alert, confirm, and prompt messages 20:34 Dealing with tab visibility
  24. By: Janus Atienza Wed, 06 Aug 2025 18:37:27 +0000 In today’s data-driven economy, access to timely, structured information offers a definitive competitive edge. Whether it’s tracking dynamic pricing in e-commerce, monitoring travel fare shifts, or extracting real-time insights from news and social media, automation lies at the heart of modern intelligence pipelines. A powerful trio—Bash, Cron, and rotating proxies—forms the backbone of a Unix-based data harvesting stack that is clean, scalable, and remarkably cost-efficient. The Unix Philosophy Meets Modern Data Scraping Unix systems are designed around a core philosophy: small, composable tools that do one thing well. This minimalist approach remains highly valuable in modern data workflows. Bash, the Bourne Again Shell, enables rapid scripting and automation. Cron schedules these Bash scripts to run at precise intervals, from every minute to monthly cycles. By integrating rotating proxies for anonymity and scale, developers can build a nimble infrastructure capable of harvesting vast volumes of structured data while avoiding detection. This methodology appeals to data operations within cybersecurity, financial modeling, private equity analytics, and market research. According to DataHorizzon Research, the global market for web scraping services reached $508 million in 2022 and is projected to surpass $1.39 billion by 2030—representing a steady compound annual growth rate (CAGR) of 13.3%. The growing demand reflects a marketplace in need of secure, scalable, and automated web data gathering. Inside a Unix-Native Scraping Pipeline Consider a market intelligence firm that wants to monitor 500 e-commerce websites for hourly changes in SKU availability, product descriptions, and pricing data. This operation might be built as follows: Bash scripts are used to retrieve content via tools like curl or wget. The data is then processed using Unix utilities such as awk, jq, and sed before being cleansed and exported to a database. Cron jobs schedule these scripts based on logic. High-demand SKUs might be queried every 15 minutes, while general product listings are updated hourly or nightly. Rotating proxies route each request through a dynamic IP pool, preventing server bans and distributing load intelligently across thousands of ephemeral user identities. A Fortune 500 retailer deploying this configuration reported monitoring over 1.2 million product pages daily. Utilizing more than 20,000 rotating IP addresses via a Cron-managed Bash framework, they saw a 12% efficiency gain in pricing strategy—directly contributing to improved margins. The Rising Importance of Rotating Proxies At large scale, preventing IP bans, CAPTCHAs, and rate limits becomes essential. Rotating proxies step in as a frontline defense. Unlike their static counterparts, rotating proxies change IP addresses for each request or session, effectively mimicking human browsing behavior to minimize detection. Research and Markets projects that the global proxy services market will exceed $1.2 billion by 2027. Today’s proxy providers offer smart APIs that easily integrate with Curl, Bash, and CI/CD pipelines, enabling seamless programmatic identity masking and data routing. Selecting the best rotating proxy service can significantly improve a scraping system’s reliability and throughput, enhancing both success rates and operational speed. For developers, using top-tier rotating proxies ensures a substantial reduction in error rates and better performance across the board. Cron: Small Tool, Big Impact While Bash scripts define the logic, Cron is the execution engine that keeps everything on track. Cron executes jobs with surgical precision, scheduling asynchronous and repetitive tasks down to the minute. It also supports grooming failed jobs, rerunning them when needed, and maintaining logs for audit and compliance purposes. Consider the example of a European fintech firm using Cron, Bash, and rotating proxies to pull real-time data from over 50 global sources. This included cryptocurrency pricing and public sentiment signals. With timely, structured data in hand, their machine learning models could deliver faster and smarter pricing recommendations, reducing decision latency by nearly 50%. Cost-Effective and Transparent Operations A major advantage of the Unix approach is cost savings. While commercial scraping platforms often carry steep subscription fees, deploying Bash and Cron on cloud services such as Hetzner or DigitalOcean can reduce operational expenses by up to 70%. This cost efficiency scales well when managing multiple data sources and endpoints. Transparency, too, is a strength. Every action—from initial HTTP request to data transformation—is logged, making it easier to debug pipelines, meet compliance requirements, and respect site-specific scraping policies like robots.txt. For industries bound by regulatory oversight, this level of visibility is critical. Real-World Deployments Academic Research: A life sciences lab used Cron-triggered shell scripts and proxy caches to scrape over 150,000 peer-reviewed articles monthly—at a cost 70% lower than commercial API alternatives. Travel Aggregation: A global travel aggregator deployed its data collection fleet on a Kubernetes-based infrastructure using Cron for job scheduling. By aligning scraping frequencies with local flight departure times, they reduced latency by 40%, significantly improving fare tracking accuracy. Challenges and Growing Complexity Despite its advantages, the Unix-based data scraping stack has its limitations. Bash scripts struggle with websites that rely heavily on JavaScript rendering. For such cases, more advanced tools like Puppeteer or Selenium—often built on JavaScript or Python—are required to simulate full browser sessions. As deployments scale across multiple instances or cloud services, managing distributed Cron jobs grows more complex. Efficient error handling, rate limit mitigation, and robust parsing often demand auxiliary Python tools or even natural language processing frameworks like spaCy or Hugging Face’s transformer models. Unix Scraping in the Modern Age Modern scraping architectures continue to evolve. Developers are now incorporating cloud-native trigger services like AWS EventBridge, serverless runners, and even AI-assisted data transformations into Unix-based stacks. The appeal is clear: more control over costs, logic, compliance, and execution. Between 2021 and 2023, GitHub repositories tagged with “bash-scripting” increased by 35%, signaling renewed interest in lightweight, script-based data engineering. For engineers familiar with the Unix ecosystem, this resurgence emphasizes the platform’s utility, transparency, and performance. Conclusion: From Script to Strategy Real-time access to web data has become mission-critical—from tracking prices to modeling markets. With Bash driving logic, Cron delivering precision, and rotating proxies ensuring anonymity, the Unix-based stack delivers a quiet yet powerful advantage. For organizations that prioritize customization, cost control, and traceability, the Unix way offers more than code—it offers strategic flexibility. Or, as one CTO aptly put it, “We didn’t just scrape the web—we scraped our way into a competitive advantage.” The post Bash, Cron and Rotating Proxies: Automating Large-Scale Web Data Harvesting the Unix Way appeared first on Unixmen.
  25. by: Blake Lundquist Wed, 06 Aug 2025 13:39:06 +0000 For a period in the 2010s, parallax was a guaranteed way to make your website “cool”. Indeed, Chris Coyier was writing about it as far back as 2008. For those unfamiliar with the concept, parallax is a pattern in which different elements of a webpage move at varying speeds as the user scrolls, creating a three-dimensional, layered appearance. A true parallax effect was once only achievable using JavaScript. However, scroll-driven animations have now given us a CSS-only solution, which is free from the main-thread blocking that can plague JavaScript animations. Parallax may have become a little cliché, but I think it’s worth revisiting with this new CSS feature. Note: Scroll-driven animations are available on Chrome, Edge, Opera, and Firefox (behind a feature flag) at the time of writing. Use a supported browser when following this tutorial. Starting code In this example, we will apply parallax animations to the background and icons within the three “hero” sections of a universe-themed webpage. We’ll start with some lightly styled markup featuring alternating hero and text sections while including some space-related nonsense as placeholder content. CodePen Embed Fallback Adding initial animations Let’s add an animation to the background pattern within each hero section to modify the background position. @keyframes parallax { from { background-position: bottom 0px center; } to { background-position: bottom -400px center; } } section.hero { /* previous code */ + animation: parallax 3s linear; } Here we use the keyframes CSS rule to create a start and end position for the background. Then we attach this animation to each of our hero sections using the animation property. By default, CSS animations are duration-based and run when the specified selector is loaded in the DOM. If you refresh your browser, you will see the animation running for three seconds as soon as the page loads. We do not want our animation to be triggered immediately. Instead, we intend to use the page’s scroll position as a reference to calculate the animation’s progress. Scroll-driven animations provide two new animation timeline CSS functions. These additions, view() and scroll(), tell the browser what to reference when calculating the progress of a CSS animation. We will use the view() function later, but for now, let’s focus on scroll(). The scroll progress timeline couples the progression of an animation to the user’s scroll position within a scroll container. Parameters can be included to change the scroll axis and container element, but these are not necessary for our implementation. Let’s use a scroll progress timeline for our animation: section.hero { /* previous code */ - animation: parallax 3s linear; + animation: parallax linear; + animation-timeline: scroll(); } If you refresh the page, you will notice that as you scroll down, the position of the background of each hero section also changes. If you scroll back up, the animation reverses. As a bonus, this CSS animation is handled off the main thread and thus is not subject to blocking by any JavaScript that may be running. Using the view progress timeline Now let’s add a new parallax layer by animating the header text and icons within each hero section. This way, the background patterns, headers, and main page content will all appear to scroll at different speeds. We will initially use the scroll() CSS function for the animation timeline here as well. @keyframes float { from { top: 25%; } to { top: 50%; } } .hero-content { /* previous code */ + position: absolute; + top: 25%; + animation: float linear; + animation-timeline: scroll(); } That’s not quite right. The animation for the sections further down the page is nearly done by the time they come into view. Luckily, the view animation timeline solves this problem. By setting the animation-timeline property to view(), our animation progresses based on the position of the subject within the scrollport, which is the part of the container that is visible when scrolling. Like the scroll animation timeline, scrolling in reverse will also reverse the animation. Let’s try changing our animation timeline property for the hero text: .hero-content { /* previous code */ - animation-timeline: scroll(); + animation-timeline: view(); } That looks pretty good, but there is a problem with the header content flashing into the view when scrolling back up the document. This is because the view timeline is calculated based on the original, pre-animation positioning of the subject element. We can solve this by adding an inset parameter to the view() function. This adjusts the size of the container in which the animation will take place. According to MDN’s documentation, the “inset is used to determine whether the element is in view which determines the length of the animation timeline. In other words, the animation lasts as long as the element is in the inset-adjusted view.” So, by using a negative value, we make the container larger than the window and trigger the animation to start a little before and end a little after the subject is visible. This accounts for the fact that the subject moves during the animation. - animation-timeline: view(); + animation-timeline: view(-100px); Now both the text and background animate smoothly at different speeds. CodePen Embed Fallback Adjusting animations using animation ranges So far, we have employed both scroll and view progress timelines. Let’s look at another way to adjust the start and end timing of the animations using the animation-range property. It can be used to modify where along the timeline the animation will start and end. We’ll start by adding a view() timeline animation to the #spaceship emoji: @keyframes launch { from { transform: translate(-100px, 200px); } to { transform: translate(100px, -100px); } } #spaceship { animation: launch; animation-timeline: view(); } Again, we see the emoji returning to its 0% position once its original unanimated position is outside of the scrollport. As discussed before, animations are based on the original pre-animation position of the subject. Previously, we solved this by adding an inset parameter to the view() function. We can also adjust the animation range and tell our animation to continue beyond 100% of the animation timeline without having to manipulate the inset of the view timeline itself. #spaceship { animation: launch; animation-timeline: view(); + animation-range: 0% 120%; } Now the animation continues until we have scrolled an extra 20% beyond the calculated scroll timeline’s normal endpoint. Let’s say that we want to add an animation to the #comet emoji, but we don’t want it to start animating until it has passed 4rem from the bottom of the scrollport: @keyframes rotate { from { transform: rotate(0deg) translateX(100px); } to { transform: rotate(-70deg) translateX(0px); } } #comet { animation: rotate linear; transform-origin: center 125px; animation-timeline: view(); animation-range: 4rem 120%; } Here we see the “delayed” animation in action: We can also combine animation ranges to run completely different animations at different points within the same timeline! Let’s illustrate this by combining animation ranges for the #satellite icon at the top of the page. The result is that the first animation runs until the icon passes 80% of the scrollport, then the second animation takes over for the final 20%. @keyframes orbit-in { 0% { transform: rotate(200deg); } 100% { transform: rotate(0deg); } } @keyframes orbit-out { 0% { transform: translate(0px, 0px); } 100% { transform: translate(-50px, -15px); } } #satellite { animation: orbit-in linear, orbit-out ease; animation-timeline: view(); animation-range: 0% 80%, 80% 110%; } Fallbacks and accessibility Our webpage features numerous moving elements that may cause discomfort for some users. Let’s consider accessibility for motion sensitivities and incorporate the prefers-reduced-motion CSS media feature. There are two possible values: no-preference, and reduce. If we want to fine-tune the webpage with animations disabled by default and then enhance each selector with animations and associated styles, then we can use no-preference to enable them. @media (prefers-reduced-motion: no-preference) { .my-selector { position: relative; top: 25%; animation: cool-animation linear; animation-timeline: scroll(); } } For us, however, the webpage content and images will still all be visible if we disable all animations simultaneously. This can be done concisely using the reduce option. It’s important to note that this sort of blanket approach works for our situation, but you should always consider the impact on your specific users when implementing accessibility features. @media (prefers-reduced-motion: reduce) { .my-selector { animation: none !important; } } In addition to considering accessibility, we should also take into account that scroll-driven animations are not supported by all browsers at the time of writing. If we care a lot about users seeing our animations, we can add a polyfill (direct link) to extend this functionality to currently unsupported browsers. This, however, will force the animation to run on the main thread. Alternatively, we could decide that performance is important enough to skip the animations on unsupported browsers, thereby keeping the main thread clear. In this case, we can use the @supports selector and include the styles only on supported browsers. Here is the final code with everything, including the polyfill and reduced motion fallback: CodePen Embed Fallback Conclusion There we go, we just re-created a classic web effect with scroll-driven animations using scroll and view progress timelines. We also discussed some of the parameters that can be used to adjust animation behavior. Whether or not parallax is your thing, I like the idea that we can use a modern approach that is capable of doing what we could before… only better with a dash of progressive enhancement. More information Unleash the Power of Scroll-Driven Animations animation-timeline (CSS-Tricks) CSS scroll-driven animations (MDN) Scroll-driven Animations Demo Site (Bramus) Bringing Back Parallax With Scroll-Driven CSS Animations originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Important Information

Terms of Use Privacy Policy Guidelines We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.