Search

Nalezeno "Article": 1990

Some CSS Grid Strategies for Matching Design Mockups


The world of web development has always had a gap between the design-to-development handoff. Ambitious designers want the final result of their effort to look unique and beautiful (and true to their initial vision), whereas many developers find more value in an outcome that is consistent...

Finally, it Will Be Easy to Change the Color of List Bullets


In my germinating years, the general advice was this: <ul> <li><span>List item</span></li> <!-- ... --> </ul> li { color: red; } /* bullet */ li span (color: black; } /* text */ Not terrible, but not great. You're "resetting" everything...

Oh Hey, Padding Percentage is Based on the Parent Element’s Width


I learned something about percentage-based (%) padding today that I had totally wrong in my head! I always thought that percentage padding was based on the element itself. So if an element is 1,000 pixels wide with padding-top: 50%, that padding is 500 pixels. It's weird having top padding based...

Thoughts After Looking at the Web Almanac’s Chapter on CSS


Woah, I didn't see this coming! The HTTP Archive dropped this big "state of the web" report called Web Almanac with guest writers exploring data from 5.8 million websites. Una Kravetz and Adam Argyle wrote the CSS chapter. The point is to squeeze a digestible amount of insight out of a mountain's...

An Early Look at the Vue 3 Composition API in the Wild


I recently had an opportunity to try the new Vue Composition API in a real project to check where it might be useful and how we could use it in the future. Until now, when we were creating a new component we were using Options API. That API forced us to separate the component’s code by options...

Making an Audio Waveform Visualizer with Vanilla JavaScript


As a UI designer, I’m constantly reminded of the value of knowing how to code. I pride myself on thinking of the developers on my team while designing user interfaces. But sometimes, I step on a technical landmine. A few years ago, as the design director of wsj.com, I was helping to re-design...

When to Use SVG vs. When to Use Canvas


SVG and canvas are both technologies that can draw stuff in web browsers, so they are worth comparing and understanding when one is more suitable than the other. Even a light understanding of them makes the choice of choosing one over the other pretty clear. A little flat-color icon? That's...

scrapestack: An API for Scraping Sites


(This is a sponsored post.) Not every site has an API to access data from it. Most don't, in fact. If you need to pull that data, one approach is to "scrape" it. That is, load the page in web browser (that you automate), find what you are looking for in the DOM, and take it. You can do this...

A Super Weird CSS Bug That Affects Text Selection


You know how you can style (to some degree) selected text with ::selection? Well, Jeff Starr uncovered a heck of a weird CSS bug. If you: Leave that selector empty Link it from an external stylesheet (rather than <style> block) Selecting text will have no style at all....

Pac-Man… in CSS!


You all know famous Pac-Man video game, right? The game is fun and building an animated Pac-Man character in HTML and CSS is just as fun! I’ll show you how to create one while leveraging the powers of the clip-path property. See the Pen Animated Pac-Man by Maks Akymenko (@maximakymenko) ...

Two-Value Display Syntax (and Sometimes Three)


You know the single-value syntax: .thing { display: block; }. The value "block" being a single value. There are lots of single values for display. For example, inline-flex, which is like flex in that it becomse a flex container, but behaves like an inline-level element rather than a block-level...

Working with Fusebox and React


If you are searching for an alternative bundler to webpack, you might want to take a look at FuseBox. It builds on what webpack offers — code-splitting, hot module reloading, dynamic imports, etc. — but code-splitting in FuseBox requires zero configuration by default (although webpack will offer...

Query JSON documents in the Terminal with GROQ


JSON documents are everywhere today, but they are rarely structured the way you want them to be. They often include too much data, have weirdly named fields, or place the data in unnecessary nested objects. Graph-Relational Object Queries (GROQ) is a query language (like SQL, but different) which...

Some Things You Oughta Know When Working with Viewport Units


David Chanin has a quickie article summarizing a problem with setting an element's height to 100vh in mobile browsers and then also positioning something on the bottom of that. Summarized in this graphic: The trouble is that Chrome isn't taking the address bar (browser chrome) into account when...

What is super() in JavaScript?


What's happening when you see some JavaScript that calls super()?.In a child class, you use super() to call its parent’s constructor and super.<methodName> to access its parent’s methods. This article will assume at least a little familiarity with the concepts of constructors and child...

Netlify CMS Open Authoring


I like the term "Git-backed CMS." That term works for an emerging style of CMS that looks and behaves much like any other CMS, with a fascinating twist: it doesn't actually store any data for you. These CMSs are connected to a Git repo where the data lives in flat files (e.g. Markdown). You teach...

Show Search Button when Search Field is Non-Empty


I think the :placeholder-shown selector is tremendously cool. It allows you to select the placeholder of an input (<input placeholder="...">) when that placeholder is present. Meaning, the input does not yet have any value. You might think input[value] could do that, or help match on...

Making a Chart? Try Using Mobx State Tree to Power the Data


Who loves charts? Everyone, right? There are lots of ways to create them, including a number of libraries. There’s D3.js, Chart.js, amCharts, Highcharts, and Chartist, to name only a few of many, many options. But we don’t necessary need a chart library to create charts. Take Mobx-state-tree (MST)...

Float Element in the Middle of a Paragraph


Say you want to have an image (or any other element) visually float left into a paragraph of text. But like... in the middle of the paragraph, not right at the top. It's doable, but it's certainly in the realm of CSS trickery! One thing you can do is slap the image right in the middle of...

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