Skip to content

Commit

Permalink
feat: support multiline block parent
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 committed Jun 30, 2021
1 parent 78ca790 commit 22aad52
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 13 deletions.
39 changes: 27 additions & 12 deletions custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -269,17 +269,11 @@ a:hover > .bullet-container .bullet {
div.items-center::before,
div.items-center::after,
.ls-block::before,
.ls-block::after {
.ls-block::after,
.block-content-wrapper::before {
transition: all 0.1s;
}

.doc-mode div.items-center::before,
.doc-mode div.items-center::after,
.doc-mode .ls-block::before,
.doc-mode .ls-block::after {
display: none;
}

.ls-block > div > div.items-center::before {
content: "";
height: 100%;
Expand Down Expand Up @@ -316,7 +310,7 @@ div.items-center::after,
background-color: var(--ct-page-reference-color);
}

.block-children:focus-within > .ls-block::before {
.block-children:focus-within > .ls-block:not(:focus-within)::before {
background-color: var(--ct-page-reference-color);
}

Expand All @@ -330,12 +324,33 @@ div.items-center::after,
background-color: transparent;
}

.block-children:focus-within > .ls-block:focus-within::before {
.block-children:focus-within > .ls-block:focus-within ~ .ls-block::before {
background: transparent;
}

.block-children:focus-within > .ls-block:focus-within ~ .ls-block::before {
background: transparent;
.ls-block > div > .block-content-wrapper {
position: relative;
}

.ls-block > div > .block-content-wrapper::before {
content: "";
top: 1em;
bottom: 0;
width: 2px;
left: -17px;
position: absolute;
background-color: transparent;
}

.ls-block:focus-within > div > .block-content-wrapper::before {
background-color: var(--ct-page-reference-color);
}

.doc-mode div.items-center::before,
.doc-mode div.items-center::after,
.doc-mode .ls-block::before,
.doc-mode .ls-block::after {
display: none;
}

/* lists */
Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"description": "A custom theme for dev"
}
],
"id": "pengx17_dev_theme"
"id": "pengx17_dev_theme",
"icon": "./logo.png"
},
"devDependencies": {
"@semantic-release/changelog": "^5.0.1",
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A theme inspired by Dev.to & Figma.

<img src="./logo.png" width="100" />

## Working Demo

https://knowledge-garden.vercel.app/
Expand Down

0 comments on commit 22aad52

Please sign in to comment.