Skip to content

Commit

Permalink
widgets: Unify spacing beneath widgets and spoilers.
Browse files Browse the repository at this point in the history
  • Loading branch information
karlstolley authored and timabbott committed Apr 22, 2024
1 parent a3476af commit 68ea670
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
14 changes: 10 additions & 4 deletions web/styles/rendered_markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,9 @@
border: hsl(0deg 0% 50%) 1px solid;
padding: 2px 8px 2px 10px;
border-radius: 10px;
position: relative;
top: 1px;
display: block;
margin: 5px 0 15px;
/* Space any subsequent Markdown content the same
distance as adjacent paragraphs are spaced. */
margin: 0 0 10px;

.spoiler-header {
/* We use flexbox to display the spoiler message
Expand Down Expand Up @@ -332,6 +331,13 @@
}
}

& > .spoiler-block:last-child {
/* A spoiler block at the end of a message, or as
a message's only content, gets the same bottom
margin as other elements. */
margin-bottom: 5px;
}

/* embedded link previews */
.message_inline_image_title {
font-weight: bold;
Expand Down
10 changes: 6 additions & 4 deletions web/styles/widgets.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
.widget-content {
/* TODO: Coordinate this value with other Markdown
element spacing, as a variable. */
margin-bottom: 5px;
}

.widget-choices {
& ul {
padding: 3px;
Expand Down Expand Up @@ -67,10 +73,6 @@
}
}
}

.add-task-bar {
margin-bottom: 5px;
}
}

.todo-widget,
Expand Down
1 change: 0 additions & 1 deletion web/templates/widgets/poll_widget.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@
<input type="text" class="poll-option" placeholder="{{t 'New option'}}" />
<button class="poll-option">{{t "Add option" }}</button>
</div>
<br />
</div>

0 comments on commit 68ea670

Please sign in to comment.