fix ReviewDetails CreatePage large tag display issue

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2022-11-21 17:20:12 -08:00
parent 0912ea7956
commit 9f9ac19b71
3 changed files with 91 additions and 90 deletions

View File

@ -12,92 +12,93 @@ class ReviewCard extends HTMLElement {
let styleEl = document.createElement("style"); let styleEl = document.createElement("style");
styleEl.textContent = ` styleEl.textContent = `
* { * {
font-family: Century Gothic; font-family: Century Gothic;
margin: 0; margin: 0;
padding: 0; padding: 0;
} overflow-wrap: anywhere;
}
a { a {
text-decoration: none; text-decoration: none;
} }
a:hover { a:hover {
text-decoration: underline; text-decoration: underline;
} }
article { article {
align-items: center; align-items: center;
border: 2px solid rgb(31, 41, 32); border: 2px solid rgb(31, 41, 32);
border-radius: 8px; border-radius: 8px;
display: grid; display: grid;
grid-template-rows: 118px 56px 14px 18px 15px 36px; grid-template-rows: 118px 56px 14px 18px 15px 36px;
height: auto; height: auto;
row-gap: 5px; row-gap: 5px;
padding: 0 16px 16px 16px; padding: 0 16px 16px 16px;
width: 178px; width: 178px;
margin: 8px 8px 8px 8px; margin: 8px 8px 8px 8px;
} }
div.rating { div.rating {
align-items: center; align-items: center;
column-gap: 5px; column-gap: 5px;
display: flex; display: flex;
} }
div.rating>img { div.rating>img {
height: auto; height: auto;
display: inline-block; display: inline-block;
object-fit: scale-down; object-fit: scale-down;
width: 78px; width: 78px;
} }
article>img { article>img {
border-top-left-radius: 6px; border-top-left-radius: 6px;
border-top-right-radius: 6px; border-top-right-radius: 6px;
height: 119px; height: 119px;
object-fit: cover; object-fit: cover;
margin-left: -16px; margin-left: -16px;
width: calc(100% + 32px); width: calc(100% + 32px);
} }
label.restaurant-name { label.restaurant-name {
color: black !important; color: black !important;
} }
label.meal-name { label.meal-name {
display: -webkit-box; display: -webkit-box;
font-size: 16px; font-size: 16px;
height: 36px; height: 36px;
line-height: 18px; line-height: 18px;
overflow: hidden; overflow: hidden;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
label:not(.meal-name), label:not(.meal-name),
span, span,
time { time {
color: #70757A; color: #70757A;
font-size: 12px; font-size: 12px;
} }
.tag-container { .tag-container {
margin-top: 20px; margin-top: 20px;
display: flex; display: flex;
flex-flow: row wrap; flex-flow: row wrap;
} }
.a-tag { .a-tag {
background-color:#94da97; background-color:#94da97;
border-radius: 7px; border-radius: 7px;
color: #94da97; color: #94da97;
padding-right: 7px; padding-right: 7px;
padding-left: 7px; padding-left: 7px;
margin: 3px; margin: 3px;
font-weight: bold; font-weight: bold;
} }
`; `;
articleEl.append(styleEl); articleEl.append(styleEl);
shadowEl.append(articleEl); shadowEl.append(articleEl);
this.shadowEl = shadowEl; this.shadowEl = shadowEl;

View File

@ -140,3 +140,8 @@ input[type=text]:focus {
.hidden { .hidden {
display: none; display: none;
} }
.tag-container * {
max-width: 100%;
overflow-wrap: anywhere;
}

View File

@ -42,8 +42,3 @@ h1 {
padding-left: 7px; padding-left: 7px;
margin: 10px 10px 10px 10px; margin: 10px 10px 10px 10px;
} }
.tag-container > .d-tag {
max-width: 100%;
overflow-wrap: anywhere;
}