Search

Nalezeno "HTML": 2739

You don’t need external assets in an HTML file


A fun exercise from Terence Eden. You can send an HTML file over the wire including anything a website might need without requesting any other files. CSS and JavaScript are easy, because there are <script and <style tags. Images and … The post You don’t need external assets...

The Big Gotcha With Custom Properties


I’ve seen this confuse more than a handful of people recently, including myself, so I’m making sure it’s written down. Let’s chuck a couple of custom properties into CSS: html { --color-1: red; --color-2: blue; } Let’s use them right … The post The...

Tabs in HTML?


Brian Kardell shares a bit about the progress of bringing "Tabs" to HTML. We kinda think we know what they are, but you have to be really specific when dealing with specs and defining them. It's tricky. The post Tabs in HTML? appeared first on CSS-Tricks. You can support CSS-Tricks by being an...

HTML is Not a Programming Language?


HTML is not a programming language. I’ve heard that sentence so many times and it’s tiring. Normally, it is followed by something like, It doesn’t have logic, or, It is not Turing complete,.so… obviously it is not a programming … The post HTML is Not a Programming Language?...

View Source (on Mobile)


Have you ever wished you could see the HTML source of a web page while on a mobile browser, which generally doesn’t offer that feature? If you have a desktop machine around, there are ways, but what I mean … The post View Source (on Mobile) appeared first on CSS-Tricks. You can support...

View Source (on Mobile)


Have you ever wished you could see the HTML source of a web page while on a mobile browser, which generally doesn’t offer that feature? If you have a desktop machine around, there are ways, but what I mean … The post View Source (on Mobile) appeared first on CSS-Tricks. You can support...

CSS Nesting, specificity, and you


Here’s Kilian Valkhof on CSS nesting which isn’t available in browsers yet, but will be soon. There are a few differences he notes between CSS nesting and nesting in Sass or Less though. Take, for example, the following code: div … The post CSS Nesting, specificity, and you appeared...

onInput Event


Coding HTML forms has been painful my entire career. Form controls look different between operating systems and browsers, coding client side and server side validation is a nightmare, and inevitably you forget something somewhere along the line. Some behaviors don’t act the way you’d...

CSS Modules (The Native Ones)


They are actually called “CSS Module Scripts” and are a native browser feature, as opposed to the popular open-source project that essentially does scoped styles by creating unique class name identifiers in both HTML and CSS. Native CSS Modules are … The post CSS Modules (The...

How to Code a Playable Synth Keyboard


With a little knowledge of music theory, we can use regular HTML, CSS and JavaScript — without any libraries or audio samples — to create a simple digital instrument. Let’s put that into practice and explore one method for creating … The post How to Code a Playable Synth Keyboard appeared...

GitHub Explains the Open Graph Images


An explanation of those new GitHub social media images: […] our custom Open Graph image service is a little Node.js app that uses the GitHub GraphQL API to collect data, generates some HTML from a template, and pipes it to  … The post GitHub Explains the Open Graph Images...

Slinkity


Perhaps the #1 reason I love Astro is that it brings the JavaScript component authoring experience to the Static Site Generator world with zero JavaScript (except bits you very specifically opt-in to). That HTML-first approach is also why I like … The post Slinkity appeared first...

ECMAScript proposal: JSON modules


Dr. Axel Rauschmayer looks at JSON modules, which is already live in Chrome 91 (but nothing else). It looks just like an ES Modules-style import, only you asset the type at the end. import configData from './config-data.json' assert {type: … The post ECMAScript proposal: JSON modules...

A Step-By-Step Process for Turning Designs Into Code


Turning website design files into a combination of HTML, CSS and JavaScript is the bread and butter of many front-end web development jobs, but there’s a part of this work that doesn’t neatly fit in to tutorials on any specific … The post A Step-By-Step Process for Turning Designs Into Code...

WordPress Admin Warnings in the Block Editor


We sent out an email the other week that ultimately had a <video> in the HTML markup. We send the newsletter by creating it here in the WordPress block editor, which is fetched through RSS-to-Mailchimp. Mailchimp dutifully sent it out, … The post WordPress Admin Warnings in the Block...

Some Typography Links


Glitter text — whO (I learned a name for people who go by a one-word moniker like that: Mononymous) created a builder for fancy SVG-based type. It’s a custom font with <text>, and the fancy comes in with a … The post Some Typography Links appeared first on CSS-Tricks. You...

Fix Seeing “0” in Your JSX Code


The early days of the web felt like the wild west when it came to coding practices — just make it work. Then we became enlightened to better practices, separating HTML from CSS and JavaScript. Then came React and JSX, where we combine JavaScript, HTML, and even CSS with Styled Components...

The Web’s Worst Default


There are a lot of great defaults when it comes to browsers and the web. Think about all the accessibility features that are baked into HTML so that you don’t have to do weird stuff, like this example from Manuel… The post The Web’s Worst Default appeared first on CSS-Tricks. You can support...

Body Toggle


I appreciate the clarity of this trick that Mikael Ainalem posted over on Reddit: It’s a one-liner that toggles the class on the <body> so you can mock up different states and toggle between them on click. <body onclick="this.classList.toggle("active");" Could … The post...

Zero-Width Space


The name zero-width space is antithetical, but it’s not without uses. In text, maybe you’d use it around slashes because you want to be sure the words are treated individually but not have any physical space around the slash:… The post Zero-Width Space appeared first...

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