Search
Integrating TypeScript with Svelte
24.12.2020
Svelte is one of the newer JavaScript frameworks and it’s rapidly rising in popularity. It’s a template-based framework, but one which allows for arbitrary JavaScript inside the template bindings; it has a superb reactivity story that’s simple, flexible and effective; and as an ahead-of-time (AOT)...
Rendering Spectrum
25.11.2020
Here are the big categories of rendering websites:
Client: ship a <div id="root"></div> and let a JavaScript template render all of it.
Static: pre-render all the HTML.
Server: let a live server process requests and generate the HTML response.
They are not mutually exclusive....
Bitcoin Hits $18,400, We Are Getting Back to the ‘Old Times’: Weekly Market Review by TokenInsight
20.11.2020
Hi, crypto communities, We are delighted to provide you with our weekly review of the crypto market, beginning this week.Continue Reading
The post Bitcoin Hits $18,400, We Are Getting Back to the ‘Old Times’: Weekly Market Review by TokenInsight appeared first on CoinMarketCap Blog
Is Impermanent Loss Overblown?: Flipside Crypto
17.11.2020
Is Impermanent Loss Overblown? The use of decentralized exchanges (DEXes) has skyrocketed this year, with volumes deposited going from underContinue Reading
The post Is Impermanent Loss Overblown?: Flipside Crypto appeared first on CoinMarketCap Blog
DeFi’s Resurgence & Bitcoin’s Most Recent Stamp of Approval: A Data Perspective by IntoTheBlock
11.11.2020
Powered by Every week, IntoTheBlock brings you on-chain analysis of top news stories in the crypto space. Leveraging blockchain’s publicContinue Reading
The post DeFi’s Resurgence & Bitcoin’s Most Recent Stamp of Approval: A Data Perspective by IntoTheBlock appeared first on CoinMarketCap Blog
Accordion Rows in CSS Grid
23.7.2020
I’d bet grid-template-columns is used about 10× more than grid-template-rows, but maybe everyone has just been missing out. Eric Meyer chucks a bunch of row lines onto his main site layout grid like this:
grid-template-rows: repeat(7, min-content) 1fr repeat(3, min-content);
That way, if...
Just another +1 for subgrid
19.6.2020
I’d say 85% of my grid usage is in one of these two categories…
I just need some pretty basic (probably equal width) columns that ends up being something like like grid-template-columns: repeat(3, minmax(0, 1fr)); to be safe.
Actually doing some real layout where five minutes in...
Equal Width Columns in CSS Grid are Kinda Weird
14.5.2020
Everything is flexible these days. If you write grid-template-columns: 200px 200px 200px;, sure, you’d have equal-width columns, but that’s a rare day. What you usually mean is three columns of equal fluid width.
We’ve got fractional units for that, like grid-template-columns:...
4 CSS Grid Properties (and One Value) for Most of Your Layout Needs
30.3.2020
CSS Grid provides us with a powerful layout system for websites. The CSS-Tricks guide gives you a comprehensive overview of Grid’s properties with layout examples. What we’re going to do here is a reverse approach to show you the smallest possible set of grid properties you need to know to meet...
The Best CV and Resume Templates for Designers
6.3.2020
Let me tell you a true story about how to get an internship in Candy Kitten, one of the famous confectionery companies in England, run by the grandson of...
The post The Best CV and Resume Templates for Designers appeared first on Onextrapixel
10+ Examples of Responsive Websites That Got It Right
27.2.2020
How do you make sure your website will look good on every browser and device? Take a look at these responsive web designs and you’ll discover how.
10+ Examples of Responsive Websites That Got It Right was written by Bogdan Sandu and published on Codrops
Responsive Grid Magazine Layout in Just 20 Lines of CSS
25.2.2020
I was recently working on a modern take of the blogroll. The idea was to offer readers a selection of latest posts from those blogs in a magazine-style layout, instead of just popping a list of our favorite blogs in the sidebar.
The easy part was grabbing a list of posts with excerpts from...
How to Build Vue Components in a WordPress Theme
18.2.2020
The inline-template directive allows us to build rich Vue components as a progressive enhancement over existing WordPress markup.
The post How to Build Vue Components in a WordPress Theme appeared first on CSS-Tricks
Select an Element with a Non-Empty Attribute
5.2.2020
Short answer:
[data-foo]:not([data-foo=""] {
Longer answer (same conclusion, just an explanation on why we might need this):
Say you have an element that you style with a special data-attribute:
<div data-highlight="product"</div
You want to target that element and do special things when...
A Web Component with Different HTML for Desktop and Mobile
16.1.2020
Christian Schaefer has a great big write-up about dealing with web advertisements. The whole thing is interesting, first documenting all the challenges that ads present, and then presenting modern solutions to each of them.
One code snippet that caught my eye was a simple way to design a component...
How to Build Your Resume on npm
2.1.2020
Just yesterday, Ali Churcher shared a neat way to make a resume using a CSS Grid layout. Let’s build off that a bit by creating a template that we can spin up whenever we want using the command line. The cool thing about that is that you’ll be able to run it with just one command.
I know...
PHP Templating in Just PHP
26.12.2019
With stuff like template literals in JavaScript and templating languages, like JSX, I've gotten used to wanting to write my HTML templates in one nice chunk and sprinkling in variables wherever I need them.
I had a situation where I needed to do that in "raw" PHP the other day, so I'm just...
The Making of a “Special Series” on a WordPress Site
18.12.2019
We just ran a fancy article series here on CSS-Tricks with a bunch of different articles all answering the same question. By fancy, I mean two things:
The articles had a specially-designed template just for them. (Example)
The series has a specially-designed landing page.
One of the reasons...
Using GitHub Template Repos to Jump-Start Static Site Projects
4.10.2019
If you’re getting started with static site generators, did you know you can use GitHub template repositories to quickly start new projects and reduce your setup time?
Most static site generators make installation easy, but each project still requires configuration after installation. When...
Intrinsically Responsive CSS Grid with minmax() and min()
31.7.2019
The most famous line of code to have come out of CSS grid so far is:
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
Without any media queries, that will set up a grid container that has a flexible number of columns. The columns will stretch a little, until there is enough room...