Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: leeonon/extract-style-variable
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.1
Choose a base ref
...
head repository: leeonon/extract-style-variable
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Sep 21, 2023

  1. doc: update readme

    leeonon committed Sep 21, 2023
    Copy the full SHA
    0381a3e View commit details
Showing with 43 additions and 1 deletion.
  1. +43 −1 README.md
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -21,9 +21,51 @@ const result = getStyleVariable({ path: src });
console.log("result", result);
```

Input:

```ts
:root {
/* --color-red */
--color-red: "red";
--color-blue: "blue";
--color-green: "green";
--nvaHeight: 20rem;
}

body {
color: aqua;
/*body normal font size*/
--fontSize: 12px;
}

#main {
border: 1px solid black;
/*
* main color example
*/
--main-color: "yellow";
}

.name,
.age {
--age-color: #8855ff;
}

ul li {
padding: 5px;
--li-color: wheat;
}

:root {
--themeColor: #6622dd;
--aThemeColor: #8855ff;
}

```

Output Results:

```json
```ts
[
{
key: ':root--color-red',