From 15c25102f814fb5356da004242865ff7876e4eda Mon Sep 17 00:00:00 2001 From: FireIsGood Date: Thu, 16 May 2024 15:57:57 -0700 Subject: [PATCH] fix: emmet format Added code wrappers to all selectors for consistency --- source/_posts/emmet.md | 193 +++++++++++++++++++---------------------- 1 file changed, 88 insertions(+), 105 deletions(-) diff --git a/source/_posts/emmet.md b/source/_posts/emmet.md index 51a9eec..954fdcf 100644 --- a/source/_posts/emmet.md +++ b/source/_posts/emmet.md @@ -3,23 +3,20 @@ title: Emmet date: 2020-12-14 18:28:43 background: bg-[#95c844] tags: - - snippets - - coding - - html - - css - - abbr + - snippets + - coding + - html + - css + - abbr categories: - - Toolkit + - Toolkit intro: | - [Emmet](https://emmet.io/) is a web-developer’s toolkit for boosting HTML & CSS code writing, which allows you to write large HTML code blocks at speed of light using well-known CSS selectors. + [Emmet](https://emmet.io/) is a web-developer’s toolkit for boosting HTML & CSS code writing, which allows you to write large HTML code blocks at speed of light using well-known CSS selectors. plugins: - - copyCode + - copyCode --- - -Emmet Syntax ---------------- - +## Emmet Syntax ### Getting started @@ -30,74 +27,66 @@ Let us start to improve your development to the speed of light. - [Emmet for Coda](https://emmet.io/download/coda/) _(emmet.io)_ - [Emmet for Atom](https://github.com/emmetio/emmet-atom#readme) _(github.com)_ +### Multiplication: \* -### Multiplication: * - -ul>li*5 +ul>li\*5 ```html ``` - - ### Child: > + `nav>ul>li` ```html ``` - ### Custom attributes {.col-span-2} -p[title="Hello world"] +`p[title="Hello world"]` ```html

``` -td[rowspan=2 colspan=3 title] +`td[rowspan=2 colspan=3 title]` ```html ``` -[a='value1' b="value2"] +`[a='value1' b="value2"]` ```html
``` - - - - ### Text: {} -a{Click me} +`a{Click me}` ```html Click me ``` -p>{Click }+a{here}+{ to continue} +`p>{Click }+a{here}+{ to continue}` ```html {.wrap}

Click here to continue

``` - ### ID and CLASS attributes {.row-span-2} `#header` @@ -106,62 +95,59 @@ p>{Click }+a{here}+{ to continue} ``` -.title +`.title` ```html
``` - -form#search.wide +`form#search.wide` ```html ``` -p.class1.class2.class3 +`p.class1.class2.class3` ```html

``` - ### Implicit tag names {.row-span-2} -.class + +`.class` ```html
``` -em>.class +`em>.class` ```html ``` +`ul>.class` -ul>.class ```html ``` - -table>.row>.col +`table>.row>.col` ```html - - - + + +
``` - ### Sibling: + -div+p+bq +`div+p+bq` ```html
@@ -169,83 +155,79 @@ div+p+bq
``` - ### Climb-up: ^ -div+div>p>span+em^bq - +`div+div>p>span+em^bq` ```html
-

-
+

+
``` - -div+div>p>span+em^^bq +`div+div>p>span+em^^bq` ```html
-

+

``` - ### Grouping: () -div>(header>ul>li*2>a)+footer>p +div>(header>ul>li\*2>a)+footer>p ```html
-
-
    -
  • -
  • -
-
-
-

-
+
+
    +
  • +
  • +
+
+
+

+
``` -(div>dl>(dt+dd)*4)+footer>p +(div>dl>(dt+dd)\*4)+footer>p + ```html
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
``` +### Indexing: $ {.col-span-2} -### $ {.row-span-2} - -ul>li.item$*3 +ul>li.item$\*3 ```html ``` -h$[title=item$]{Header $}*3 +h$[title=item$]{Header $}\*3 ```html

Header 1

@@ -253,35 +235,36 @@ h$[title=item$]{Header $}*3

Header 3

``` -ul>li.item$$$*3 +ul>li.item$$$\*3 ```html ``` -ul>li.item$@-*3 +ul>li.item$@-\*3 + ```html ``` -ul>li.item$@2*3 +ul>li.item$@2\*3 + ```html ``` -Also see {.cols-1} --------- +## Also see {.cols-1} -* [Emmet Cheat sheet](https://docs.emmet.io/cheat-sheet/) _(docs.emmet.io)_ +- [Emmet Cheat sheet](https://docs.emmet.io/cheat-sheet/) _(docs.emmet.io)_