Skip to main content
CSS-Tricks
  • Articles
  • Videos
  • Almanac
  • Newsletter
  • Guides
  • DigitalOcean
  • DO Community
Search

Articles Tagged
syntax

13 Articles
{
,

}
Direct link to the article Why (and How) I Write Code With Pencil and Paper
process syntax work

Why (and How) I Write Code With Pencil and Paper

If the thought of handwriting code seems silly, it might surprise you to know that it’s inevitable. If you’re unsure, think about the last job interview you did, and remember how there was no computer around in the interview room …

Avatar of Preethi
Preethi on Aug 17, 2022
Direct link to the article Syntax Highlighting (and More!) With Prism on a Static Site
next.js static sites syntax

Syntax Highlighting (and More!) With Prism on a Static Site

So, you’ve decided to build a blog with Next.js. Like any dev blogger, you’d like to have code snippets in your posts that are formatted nicely with syntax highlighting. Perhaps you also want to display line numbers in the …

Avatar of Adam Rackis
Adam Rackis on May 4, 2022
Direct link to the article Creating an Editable Textarea That Supports Syntax-Highlighted Code
forms pre syntax textarea

Creating an Editable Textarea That Supports Syntax-Highlighted Code

When I was working on a project that needed an editor component for source code, I really wanted a way to have that editor highlight the syntax that is typed. There are projects like this, like CodeMirror, Ace, …

Avatar of Oliver Geer
Oliver Geer on Apr 16, 2021 (Updated on Nov 16, 2021)
Direct link to the article Building a Scalable CSS Architecture With BEM and Utility Classes
architecture bem naming syntax

Building a Scalable CSS Architecture With BEM and Utility Classes

Maintaining a large-scale CSS project is hard. Over the years, we’ve witnessed different approaches aimed at easing the process of writing scalable CSS. In the end, we all try to meet the following two goals:

  1. Efficiency: we want to
…
Avatar of Sebastiano Guerriero
Sebastiano Guerriero on Apr 21, 2020 (Updated on Oct 21, 2021)
Direct link to the article Why JavaScript is Eating HTML
html-in-js react syntax

Why JavaScript is Eating HTML

Web development is always changing. One trend in particular has become very popular lately, and it fundamentally goes against the conventional wisdom about how a web page should be made. It is exciting for some but frustrating for others, and …

Avatar of Mike Turley
Mike Turley on Feb 13, 2020 (Updated on Feb 14, 2020)
Direct link to the article Two-Value Display Syntax (and Sometimes Three)
display layout syntax

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 …

Avatar of Chris Coyier
Chris Coyier on Nov 8, 2019 (Updated on Nov 11, 2019)
Direct link to the article (Why) Some HTML is “optional”
syntax

(Why) Some HTML is “optional”

Direct Link

Remy Sharp digs into the history of the web and describes why the "p" tag doesn’t need to be closed. Side quest fun: also where there will never be new elements added to the "head".
Avatar of Robin Rendle
Shared by Robin Rendle on Sep 16, 2019
Direct link to the article Some HTML is “Optional”
standards syntax

Some HTML is “Optional”

There is a variety of HTML that you can just leave out of the source HTML and it’s still valid markup.

Doesn’t this look weird?

<p>Paragraph one.
</p><p>Paragraph two.
</p><p>Paragraph three.</p>

It does to me, but the closing tags are …

Avatar of Chris Coyier
Chris Coyier on Sep 11, 2019
Direct link to the article Clever code
syntax

Clever code

This week, Chris Ferdinandi examined a clever JavaScript snippet, one that’s written creatively with new syntax features, but is perhaps less readable and performant. It’s a quick read, but his callout of our industry’s fixation on cleverness is worth… …

Avatar of Robin Rendle
Robin Rendle on Apr 17, 2019
Direct link to the article Resilient, Declarative, Contextual
learning syntax

Resilient, Declarative, Contextual

Direct Link

Keith J. Grant:

I want to look at three key characteristics of CSS that set it apart from conventional programming languages: it’s resilient; it’s declarative; and it’s contextual. Understanding these aspects of the language, I think, is key to becoming

…
Avatar of Chris Coyier
Shared by Chris Coyier on Jun 25, 2018
Direct link to the article Combining the Powers of SEM and BIO for Improving CSS
bem itcss oocss specificity syntax

Combining the Powers of SEM and BIO for Improving CSS

CSS is easy, some might argue, but that “easiness” can cause messy code. This is especially true through power of preprocessors like Sass or Less where, if you aren’t careful, your CSS can become harder to deal with instead of …

Avatar of Ryan Yu
Ryan Yu on Jun 4, 2018 (Updated on Jun 9, 2018)
  • 1
  • 2
  • Older

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • DigitalOcean
  • DigitalOcean Community
  • About DigitalOcean
  • Legal
  • Agency Coaching
  • Free Credit Offer
CSS-Tricks
  • Email
  • Guest Writing
  • Book
  • Advertising
Follow
  • Mastodon
  • Twitter
  • Instagram
  • YouTube
  • CodePen
  • iTunes
  • RSS
Back to Top