Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(editor): remove unnecessary css styles (#11885)

fundon4fd468c46f2e
diff --git a/blocksuite/affine/blocks/attachment/src/styles.ts b/blocksuite/affine/blocks/attachment/src/styles.ts
index ff55c81cad..72508f8fa4 100644
--- a/blocksuite/affine/blocks/attachment/src/styles.ts
+++ b/blocksuite/affine/blocks/attachment/src/styles.ts
@@ -26,9 +26,6 @@ export const styles = css`
align-items: flex-start;
gap: 12px;
flex: 1 0 0;
-
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-attachment-content-title {
@@ -38,9 +35,6 @@ export const styles = css`
align-items: center;
align-self: stretch;
- padding: var(--1, 0px);
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-attachment-content-title-icon {
diff --git a/blocksuite/affine/blocks/bookmark/src/styles.ts b/blocksuite/affine/blocks/bookmark/src/styles.ts
index a7d0580ef0..b754c54d87 100644
--- a/blocksuite/affine/blocks/bookmark/src/styles.ts
+++ b/blocksuite/affine/blocks/bookmark/src/styles.ts
@@ -19,7 +19,6 @@ export const styles = css`
border-radius: 8px;
border: 1px solid var(--affine-background-tertiary-color);
- opacity: var(--add, 1);
background: var(--affine-background-primary-color);
user-select: none;
}
@@ -32,8 +31,6 @@ export const styles = css`
align-self: stretch;
gap: 4px;
padding: 12px;
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-bookmark-content-title {
@@ -43,9 +40,6 @@ export const styles = css`
align-items: center;
align-self: stretch;
- padding: var(--1, 0px);
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-bookmark-content-title-icon {
@@ -152,7 +146,6 @@ export const styles = css`
width: 204px;
max-width: 100%;
height: 102px;
- opacity: var(--add, 1);
}
.affine-bookmark-banner img,
@@ -162,7 +155,7 @@ export const styles = css`
max-width: 100%;
height: 102px;
object-fit: cover;
- border-radius: 4px 4px var(--1, 0px) var(--1, 0px);
+ border-radius: 4px;
}
.affine-bookmark-card.loading {
diff --git a/blocksuite/affine/blocks/embed/src/embed-figma-block/styles.ts b/blocksuite/affine/blocks/embed/src/embed-figma-block/styles.ts
index 232c339bbc..da06a51243 100644
--- a/blocksuite/affine/blocks/embed/src/embed-figma-block/styles.ts
+++ b/blocksuite/affine/blocks/embed/src/embed-figma-block/styles.ts
@@ -13,7 +13,6 @@ export const styles = css`
border-radius: 8px;
border: 1px solid var(--affine-background-tertiary-color);
- opacity: var(--add, 1);
background: var(--affine-background-primary-color);
user-select: none;
}
@@ -21,7 +20,6 @@ export const styles = css`
.affine-embed-figma {
flex-grow: 1;
width: 100%;
- opacity: var(--add, 1);
}
.affine-embed-figma img,
@@ -30,7 +28,7 @@ export const styles = css`
width: 100%;
height: 100%;
object-fit: cover;
- border-radius: 4px 4px var(--1, 0px) var(--1, 0px);
+ border-radius: 4px;
}
.affine-embed-figma-iframe-container {
@@ -41,7 +39,7 @@ export const styles = css`
.affine-embed-figma-iframe-container > iframe {
width: 100%;
height: 100%;
- border-radius: 4px 4px var(--1, 0px) var(--1, 0px);
+ border-radius: 4px;
border: none;
}
@@ -62,8 +60,6 @@ export const styles = css`
flex-direction: column;
width: 100%;
height: fit-content;
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-embed-figma-content-header {
@@ -73,9 +69,6 @@ export const styles = css`
align-items: center;
align-self: stretch;
- padding: var(--1, 0px);
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-embed-figma-content-title-icon {
diff --git a/blocksuite/affine/blocks/embed/src/embed-github-block/styles.ts b/blocksuite/affine/blocks/embed/src/embed-github-block/styles.ts
index c6c5240e8b..10934ac1d5 100644
--- a/blocksuite/affine/blocks/embed/src/embed-github-block/styles.ts
+++ b/blocksuite/affine/blocks/embed/src/embed-github-block/styles.ts
@@ -11,7 +11,6 @@ export const styles = css`
border-radius: 8px;
border: 1px solid var(--affine-background-tertiary-color);
- opacity: var(--add, 1);
background: var(--affine-background-primary-color);
user-select: none;
overflow: hidden;
@@ -24,8 +23,6 @@ export const styles = css`
align-self: stretch;
gap: 4px;
padding: 12px;
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
overflow: hidden;
}
@@ -37,9 +34,6 @@ export const styles = css`
align-items: center;
align-self: stretch;
- padding: var(--1, 0px);
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-embed-github-content-title-icons {
@@ -214,7 +208,6 @@ export const styles = css`
margin: 12px 0px 0px 12px;
width: 204px;
height: 102px;
- opacity: var(--add, 1);
}
.affine-embed-github-banner img,
@@ -223,7 +216,7 @@ export const styles = css`
width: 204px;
height: 102px;
object-fit: cover;
- border-radius: 4px 4px var(--1, 0px) var(--1, 0px);
+ border-radius: 4px;
}
.affine-embed-github-block.loading {
@@ -288,7 +281,6 @@ export const styles = css`
.affine-embed-github-content-assignees {
display: flex;
- padding: var(--1, 0px);
align-items: center;
justify-content: flex-start;
gap: 2px;
diff --git a/blocksuite/affine/blocks/embed/src/embed-html-block/styles.ts b/blocksuite/affine/blocks/embed/src/embed-html-block/styles.ts
index b832a9a4a3..70a296ef05 100644
--- a/blocksuite/affine/blocks/embed/src/embed-html-block/styles.ts
+++ b/blocksuite/affine/blocks/embed/src/embed-html-block/styles.ts
@@ -17,7 +17,6 @@ export const styles = css`
border-radius: 12px;
border: 1px solid var(--affine-background-tertiary-color);
- opacity: var(--add, 1);
background: var(--affine-background-primary-color);
user-select: none;
}
@@ -25,7 +24,6 @@ export const styles = css`
.affine-embed-html {
flex-grow: 1;
width: 100%;
- opacity: var(--add, 1);
}
.affine-embed-html img,
@@ -34,7 +32,7 @@ export const styles = css`
width: 100%;
height: 100%;
object-fit: cover;
- border-radius: 4px 4px var(--1, 0px) var(--1, 0px);
+ border-radius: 4px;
}
.affine-embed-html-iframe-container {
@@ -94,10 +92,6 @@ export const styles = css`
display: flex;
align-items: center;
gap: 8px;
-
- padding: var(--1, 0px);
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-embed-html-title-icon {
diff --git a/blocksuite/affine/blocks/embed/src/embed-linked-doc-block/styles.ts b/blocksuite/affine/blocks/embed/src/embed-linked-doc-block/styles.ts
index 9447e8c4da..c6514dd7bb 100644
--- a/blocksuite/affine/blocks/embed/src/embed-linked-doc-block/styles.ts
+++ b/blocksuite/affine/blocks/embed/src/embed-linked-doc-block/styles.ts
@@ -11,7 +11,6 @@ export const styles = css`
height: 100%;
border-radius: 8px;
border: 1px solid var(--affine-background-tertiary-color);
- opacity: var(--add, 1);
background: var(--affine-background-primary-color);
user-select: none;
position: relative;
@@ -25,8 +24,6 @@ export const styles = css`
align-self: stretch;
gap: 4px;
padding: 12px;
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
max-width: 100%;
}
@@ -36,9 +33,6 @@ export const styles = css`
gap: 8px;
align-items: center;
align-self: stretch;
- padding: var(--1, 0px);
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-embed-linked-doc-content-title-icon {
@@ -169,7 +163,6 @@ export const styles = css`
width: 204px;
max-width: 100%;
height: 102px;
- opacity: var(--add, 1);
pointer-events: none;
}
.affine-embed-linked-doc-banner img,
@@ -179,7 +172,7 @@ export const styles = css`
max-width: 100%;
height: 102px;
object-fit: cover;
- border-radius: 4px 4px var(--1, 0px) var(--1, 0px);
+ border-radius: 4px;
}
.affine-embed-linked-doc-block.loading {
diff --git a/blocksuite/affine/blocks/embed/src/embed-loom-block/styles.ts b/blocksuite/affine/blocks/embed/src/embed-loom-block/styles.ts
index f2eb92c94a..5e4e209b00 100644
--- a/blocksuite/affine/blocks/embed/src/embed-loom-block/styles.ts
+++ b/blocksuite/affine/blocks/embed/src/embed-loom-block/styles.ts
@@ -14,7 +14,6 @@ export const styles = css`
border-radius: 8px;
border: 1px solid var(--affine-background-tertiary-color);
- opacity: var(--add, 1);
background: var(--affine-background-primary-color);
user-select: none;
}
@@ -22,7 +21,6 @@ export const styles = css`
.affine-embed-loom-video {
flex-grow: 1;
width: 100%;
- opacity: var(--add, 1);
}
.affine-embed-loom-video img,
@@ -31,7 +29,7 @@ export const styles = css`
width: 100%;
height: 100%;
object-fit: cover;
- border-radius: 4px 4px var(--1, 0px) var(--1, 0px);
+ border-radius: 4px;
}
.affine-embed-loom-video-iframe-container {
@@ -42,7 +40,7 @@ export const styles = css`
.affine-embed-loom-video-iframe-container > iframe {
width: 100%;
height: 100%;
- border-radius: 4px 4px var(--1, 0px) var(--1, 0px);
+ border-radius: 4px;
}
.affine-embed-loom-video-iframe-overlay {
@@ -62,8 +60,6 @@ export const styles = css`
flex-direction: column;
width: 100%;
height: fit-content;
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-embed-loom-content-header {
@@ -73,9 +69,6 @@ export const styles = css`
align-items: center;
align-self: stretch;
- padding: var(--1, 0px);
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-embed-loom-content-title-icon {
diff --git a/blocksuite/affine/blocks/embed/src/embed-synced-doc-block/styles.ts b/blocksuite/affine/blocks/embed/src/embed-synced-doc-block/styles.ts
index 0189eadf7b..141f01e4cb 100644
--- a/blocksuite/affine/blocks/embed/src/embed-synced-doc-block/styles.ts
+++ b/blocksuite/affine/blocks/embed/src/embed-synced-doc-block/styles.ts
@@ -196,7 +196,6 @@ export const cardStyles = css`
height: ${EMBED_CARD_HEIGHT.horizontal}px;
border-radius: 8px;
border: 1px solid var(--affine-background-tertiary-color);
- opacity: var(--add, 1);
background: var(--affine-background-primary-color);
user-select: none;
}
@@ -209,8 +208,6 @@ export const cardStyles = css`
align-self: stretch;
gap: 4px;
padding: 12px;
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-embed-synced-doc-card-content-title {
@@ -219,9 +216,6 @@ export const cardStyles = css`
gap: 8px;
align-items: center;
align-self: stretch;
- padding: var(--1, 0px);
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-embed-synced-doc-card-content-title-icon {
@@ -337,7 +331,6 @@ export const cardStyles = css`
width: 204px;
max-width: 100%;
height: 102px;
- opacity: var(--add, 1);
pointer-events: none;
}
.affine-embed-synced-doc-card-banner.render {
@@ -350,7 +343,7 @@ export const cardStyles = css`
max-width: 100%;
height: 102px;
object-fit: cover;
- border-radius: 4px 4px var(--1, 0px) var(--1, 0px);
+ border-radius: 4px;
}
.affine-embed-synced-doc-card.loading,
diff --git a/blocksuite/affine/blocks/embed/src/embed-youtube-block/styles.ts b/blocksuite/affine/blocks/embed/src/embed-youtube-block/styles.ts
index 0903d22d16..56cdbf59e2 100644
--- a/blocksuite/affine/blocks/embed/src/embed-youtube-block/styles.ts
+++ b/blocksuite/affine/blocks/embed/src/embed-youtube-block/styles.ts
@@ -15,7 +15,6 @@ export const styles = css`
border-radius: 8px;
border: 1px solid var(--affine-background-tertiary-color);
- opacity: var(--add, 1);
background: var(--affine-background-primary-color);
user-select: none;
}
@@ -23,7 +22,6 @@ export const styles = css`
.affine-embed-youtube-video {
flex-grow: 1;
width: 100%;
- opacity: var(--add, 1);
}
.affine-embed-youtube-video img,
@@ -32,7 +30,7 @@ export const styles = css`
width: 100%;
height: 100%;
object-fit: cover;
- border-radius: 4px 4px var(--1, 0px) var(--1, 0px);
+ border-radius: 4px;
}
.affine-embed-youtube-video-iframe-container {
@@ -43,7 +41,7 @@ export const styles = css`
.affine-embed-youtube-video-iframe-container > iframe {
width: 100%;
height: 100%;
- border-radius: 4px 4px var(--1, 0px) var(--1, 0px);
+ border-radius: 4px;
}
.affine-embed-youtube-video-iframe-overlay {
@@ -63,8 +61,6 @@ export const styles = css`
flex-direction: column;
width: 100%;
height: fit-content;
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-embed-youtube-content-header {
@@ -74,9 +70,6 @@ export const styles = css`
align-items: center;
align-self: stretch;
- padding: var(--1, 0px);
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
}
.affine-embed-youtube-content-title-icon {
diff --git a/blocksuite/affine/components/src/link-preview/link.ts b/blocksuite/affine/components/src/link-preview/link.ts
index a3d211ca01..2fde9be69f 100644
--- a/blocksuite/affine/components/src/link-preview/link.ts
+++ b/blocksuite/affine/components/src/link-preview/link.ts
@@ -14,9 +14,6 @@ export class LinkPreview extends LitElement {
justify-content: flex-start;
min-width: 60px;
max-width: 140px;
- padding: var(--1, 0px);
- border-radius: var(--1, 0px);
- opacity: var(--add, 1);
user-select: none;
cursor: pointer;
@@ -39,7 +36,6 @@ export class LinkPreview extends LitElement {
text-overflow: ellipsis;
overflow: hidden;
- opacity: var(--add, 1);
}
`;