Skip to content

Commit c796dbc

Browse files
authored
fix: style message (#496)
* fix: add component path * fix: style of some tags Some styles were wrong * fix; margin in compact-mode The margin in comapct moder was wrong * Update package.json I made the branch worng * Update DiscordVerifiedAuthorTag.ts * Update DiscordAuthorInfo.ts * fix: margin message "text-indent" was making some parts of messages buggy * removeing "gap"
1 parent 1b206b1 commit c796dbc

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

packages/core/src/components/discord-author-info/DiscordAuthorInfo.ts

+29-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export class DiscordAuthorInfo extends LitElement {
9090
background-color: #5865f2;
9191
color: #fff;
9292
font-size: 0.625em;
93-
margin-left: 4px;
9493
border-radius: 3px;
9594
line-height: 100%;
9695
text-transform: uppercase;
@@ -106,6 +105,31 @@ export class DiscordAuthorInfo extends LitElement {
106105
border-radius: 0.1875rem;
107106
}
108107
108+
:host .discord-official-application {
109+
background-color: #5865f2;
110+
color: #fff;
111+
font-size: 0.625em;
112+
margin-left: 4px;
113+
border-radius: 3px;
114+
line-height: 100%;
115+
text-transform: uppercase;
116+
117+
/* Use flex layout to ensure both verified icon and "BOT" text are aligned to center */
118+
display: flex;
119+
align-items: center;
120+
121+
/* Styling taken through Inspect Element on Discord client for Windows */
122+
height: 0.9375rem;
123+
padding: 0 0.275rem;
124+
margin-top: 0.075em;
125+
border-radius: 0.1875rem;
126+
}
127+
128+
:host([compact-mode]) .discord-official-application {
129+
margin-right: 5px;
130+
margin-left: 0px !important;
131+
}
132+
109133
:host .discord-application-tag.discord-application-tag-op {
110134
background-color: #c9cdfb;
111135
color: #4752c4;
@@ -233,7 +257,10 @@ export class DiscordAuthorInfo extends LitElement {
233257
() => html`<discord-verified-author-tag .verified=${this.verified}></discord-verified-author-tag>`
234258
)}
235259
${when(this.server && !this.bot && !this.officialApp, () => html`<span class="discord-application-tag">Server</span>`)}
236-
${when(this.officialApp && !this.server && !this.bot, () => html`<span class="discord-application-tag">${VerifiedTick()}OFFICIAL</span>`)}
260+
${when(
261+
this.officialApp && !this.server && !this.bot,
262+
() => html`<span class="discord-official-application">${VerifiedTick()}OFFICIAL</span>`
263+
)}
237264
${when(this.op, () => html`<span class="discord-application-tag discord-application-tag-op">OP</span>`)}
238265
${when(
239266
this.compactMode,

packages/core/src/components/discord-message/DiscordMessage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export class DiscordMessage extends LitElement implements LightTheme {
190190
:host([compact-mode]) .discord-message-body {
191191
line-height: 1.375rem;
192192
padding-left: 10px;
193-
text-indent: -6px;
193+
margin-left: -6px;
194194
}
195195
196196
:host([compact-mode]) .discord-message-compact-indent {

packages/core/src/components/discord-verified-author-tag/DiscordVerifiedAuthorTag.ts

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export class DiscordVerifiedAuthorTag extends LitElement {
3535
padding-left: 10px;
3636
padding-right: 4px;
3737
margin-right: 0.25rem;
38+
margin-left: 0px !important;
39+
margin-top: 0px !important;
3840
}
3941
4042
:host([compact-mode]) .discord-application-tag-verified {

0 commit comments

Comments
 (0)