Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: comment view styling #7965

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions core/comments/comment_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export class CommentView implements IRenderedElement {
Svg.IMAGE,
{
'class': 'blocklyFoldoutIcon',
'href': `${workspace.options.pathToMedia}arrow-dropdown.svg`,
'href': `${workspace.options.pathToMedia}foldout-icon.svg`,
},
topBarGroup,
);
Expand Down Expand Up @@ -736,7 +736,6 @@ css.register(`
.blocklyWorkspace {
--commentFillColour: #FFFCC7;
--commentBorderColour: #F2E49B;
--commentIconColour: #1A1A1A
}

.blocklyComment .blocklyTextarea {
Expand All @@ -759,22 +758,18 @@ css.register(`
.blocklyDeleteIcon {
width: 20px;
height: 20px;
display: none;
fill: var(--commentIconColour);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work fine, I think the problem is that you're overriding this because the actual svg has "fill" as an inline attribute.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope I tried that! <image> tags basically work like <img> tags, meaning you can't style their contents.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, that's annoying and I hate all of the weird tricks to make it work :(

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it sucks, I also tried using <use> tags instead, but those just don't show up at all.

cursor: pointer;
}

.blocklyFoldoutIcon {
width: 20px;
height: 20px;
fill: var(--commentIconColour);
transform-origin: 12px 12px;
cursor: pointer;
}
.blocklyResizeHandle {
width: 12px;
height: 12px;
stroke: var(--commentIconColour);
cursor: se-resize;
}

Expand All @@ -784,7 +779,7 @@ css.register(`
}

.blocklyComment .blocklyCommentPreview.blocklyText {
fill: var(--commentIconColour);
fill: #000;
dominant-baseline: middle;
visibility: hidden;
}
Expand Down
1 change: 1 addition & 0 deletions media/delete-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading