Search

Nalezeno "svg": 516

How I Made an Icon System Out of CSS Custom Properties


SVG is the best format for icons on a website, there is no doubt about that. It allows you to have sharp icons no matter the screen pixel density, you can change the styles of the SVG on hover … How I Made an Icon System Out of CSS Custom Properties originally published on CSS-Tricks, which...

CSS :autofill


Autofilling HTML input elements is a frequent user action that can drastically improve user experience. Hell, we all autofill for our passwords and address information. But what control do we have when input elements have been autofilled? To add custom CSS styles to inputs whose contents have been...

Monitor Events and Function Calls via Console


Despite having worked on the very complex Firefox for a number of years, I’ll always love plain old console.log debugging. Logging can provide an audit trail as events happen and text you can share with others. Did you know that chrome provides monitorEvents and monitor so that you can get...

CSS :out-of-range


One aspect of web development I’ve always loathed was working with forms. Form elements have been traditionally difficult to style due to OS and browser differences, and validation can be a nightmare. Luckily the native HTML APIs added methods for improving the form validation situation. With...

git Force Push


Rebasing is a frequent task for anyone using git. We sometimes use rebasing to branch our code from the last changes or even just to drop commits from a branch. Oftentimes when trying to push after a rebase, you’ll see something like the following: hint: Updates were rejected because the...

Specify Node Versions with .nvmrc


I’ve heavily promoted nvm, a Node.js version manager, over the years. Having a tool to manage multiple versions of a language interpreter has been so useful, especially due to the complexity of Node.js package management. One tip I like to give new developers is adding a .nvmrc file to their...

How to Inject a Global with Web Extensions in Manifest V3


For those of you not familiar with the world of web extension development, a storm is brewing with Chrome. Google will stop support for manifest version 2, which is what the vast majority of web extensions use. Manifest version 3 sees many changes but the largest change is moving from persistent...

How Plugins Enhance The WYSIWYG Editing Experience (Sponsored)


WYSIWYG editors are one of the core components of any content management system (CMS). A well-coded, feature-filled WYSIWYG HTML editor can distinguish between a CMS users love and one they can’t stand.  While all WYSIWYG editors have a set of basic functionality, the power of plugins...

JavaScript Event.defaultPrevented


Whether you started with the old on_____ property or addEventListener, you know that events drive user experiences in modern JavaScript. If you’ve worked with events, you know that preventDefault() and stopPropagation() are frequently used to handle events. One thing you probably didn’t...

7 Ways to Optimize Performance for Your WordPress Site (Sponsored)


The vast majority of blogs, news websites, and information websites run on WordPress. While the WordPress developer team and community do their best to ensure wordPress is performant, there are a number of practices you can implement to keep your site blazing fast. Let’s look at some of them!...

How stroke-dasharray Patterns Work


Say you have a line in SVG: <svg<line x1="0" y1="30" x2="500" y2="30" stroke-color="#f8a100" /</svg You can use the stroke-dasharray property in CSS to make dashes: line { stroke-dasharray: 5; } That 5 value is a relative unit based … How stroke-dasharray Patterns...

How to Get Extension Manifest Information


Working on a web extension can be kinda wild — on one side you’re essentially just coding a website, on the other side you’re limited to what the browser says you can do in the extension execution environment. One change in that environment is coming January 2023 — pushing...

Collective #718


Color.js * Defensive CSS * svg-path-morph * PRQL * My Wonderful HTML Email Workflow The post Collective #718 appeared first on Codrops

How to Reverse an Animated GIF


Modifying visual media via code has always been a fascination of mine. Probably because I’m not a designer and I tend to stick to what I’m good at. One visual effect I love is seeing video reversed — it provides a sometimes hilarious perspective on a given event. Take this...

How to Animate SVG Shapes on Scroll


A short tutorial on how to animate SVG paths while smooth scrolling a page. The post How to Animate SVG Shapes on Scroll appeared first on Codrops

Mastering SVG’s stroke-miterlimit Attribute


So, SVG has this stroke-miterlimit presentation attribute. You’ve probably seen it when exporting an SVG from a graphic editor program, or perhaps you find out you could remove it without noticing any change to the visual appearance. After a good … Mastering SVG’s stroke-miterlimit...

CSS :optional


A decade ago HTML and CSS added the ability to, at least signal, validation of form fields. The required attribute helped inform users which fields were required, while pattern allowed developers to provide a regular expression to match against an <input>‘s value. Targeting required...

Get a Random Array Item with JavaScript


JavaScript Arrays are probably my favorite primitive in JavaScript. You can do all sorts of awesome things with arrays: get unique values, clone them, empty them, etc. What about getting a random value from an array? To get a random item from an array, you can employ Math.random: const arr =...

Legacy String Methods for Generating HTML


I’m always really excited to see new methods on JavaScript primitives. These additions are acknowledgement that the language needs to evolve and that we’re doing exciting new things. That being said, I somehow just discovered some legacy String methods that you probably shouldn’t...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace