mirror of
https://github.com/sboulema/mtg-deck.git
synced 2026-07-22 06:50:39 +00:00
232 lines
4 KiB
CSS
232 lines
4 KiB
CSS
/* Deck List */
|
|
|
|
.decklist {
|
|
padding: 8px;
|
|
overflow: visible;
|
|
}
|
|
|
|
.decklist__section-container {
|
|
position: relative;
|
|
overflow: visible;
|
|
}
|
|
|
|
.decklist__section-container table {
|
|
width: 100%;
|
|
border: var(--table-border-width) solid var(--table-border-color);
|
|
}
|
|
|
|
/* A table column without .max should be a narrow column but it should not spread content over multiple lines */
|
|
.decklist .decklist__section-container :where(th, td):not(.max) {
|
|
width: 0;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.decklist th,
|
|
.decklist td {
|
|
border: none;
|
|
}
|
|
|
|
.type-separator td,
|
|
.decklist tfoot {
|
|
border-top: var(--table-border-width) solid var(--table-border-color);
|
|
}
|
|
|
|
.type-summary {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.type-summary__item {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 3px;
|
|
white-space: nowrap;
|
|
margin-right: 5px;
|
|
}
|
|
|
|
.type-summary__item svg {
|
|
vertical-align: middle;
|
|
position: relative;
|
|
}
|
|
|
|
/* Deck format validation */
|
|
|
|
.decklist tfoot.decklist__section-totals td.decklist__validation-errors {
|
|
border-top: var(--table-border-width) solid var(--table-border-color);
|
|
}
|
|
|
|
.decklist__validation-error--banned,
|
|
.decklist__validation-error--not_legal,
|
|
.decklist__validation-error--deck_size,
|
|
.decklist__validation-error--sideboard_size,
|
|
.decklist__validation-error--max_copies,
|
|
.decklist__validation-error--commander_zone,
|
|
.decklist__validation-error--color_identity,
|
|
.decklist__validation-error--companion {
|
|
color: #aa3333;
|
|
}
|
|
|
|
.decklist__validation-error--restricted {
|
|
color: #c87000;
|
|
}
|
|
|
|
/* Card */
|
|
|
|
.card-cost {
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
align-items: center;
|
|
}
|
|
|
|
.card-image {
|
|
border-radius: 8px;
|
|
}
|
|
|
|
span.card-name {
|
|
flex: 2;
|
|
}
|
|
|
|
span.comment {
|
|
color: #999999;
|
|
font-style: italic;
|
|
}
|
|
|
|
.card-image-container {
|
|
display: none;
|
|
position: fixed;
|
|
margin-left: 50px;
|
|
width: 200px;
|
|
z-index: 1000;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
/* Prevent card preview from being clipped in edit mode */
|
|
/* !important is needed to override Obsidian's own !important declarations */
|
|
.markdown-source-view.mod-cm6 .cm-content > [contenteditable=false] [class^="block-language-mtg-deck"],
|
|
.markdown-source-view.mod-cm6 .cm-content > [contenteditable=false] .cm-preview-code-block,
|
|
.markdown-source-view.mod-cm6 .cm-preview-code-block.cm-embed-block.markdown-rendered[class*="cm-lang-mtg-deck"] {
|
|
contain: initial !important;
|
|
overflow: visible;
|
|
}
|
|
|
|
.card-rarity {
|
|
display: inline-block;
|
|
width: 5px;
|
|
height: 5px;
|
|
border-radius: 50%;
|
|
margin-right: 10px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.card-rarity.common {
|
|
background-color: black;
|
|
}
|
|
|
|
.card-rarity.uncommon {
|
|
background-color: silver;
|
|
}
|
|
|
|
.card-rarity.rare {
|
|
background-color: #ffd700;
|
|
}
|
|
|
|
.card-rarity.mythic {
|
|
background-color: #d06d34;
|
|
}
|
|
|
|
.card-rarity.special {
|
|
background-color: #73378F;
|
|
}
|
|
|
|
.count {
|
|
flex: 1;
|
|
}
|
|
|
|
.insufficient-count {
|
|
color: #666666;
|
|
font-style: italic;
|
|
}
|
|
|
|
.error {
|
|
color: #aa3333;
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Buylist */
|
|
|
|
.buylist-container {
|
|
z-index: 0;
|
|
}
|
|
|
|
.buylist-line {
|
|
display: flex;
|
|
}
|
|
|
|
.buylist-line span {
|
|
flex: 1;
|
|
}
|
|
|
|
.buylist-line .decklist__section-totals__count {
|
|
flex: 1;
|
|
}
|
|
|
|
.buylist-line .card-name {
|
|
flex: 4;
|
|
}
|
|
|
|
.buylist-line .decklist__section-totals {
|
|
flex: 1;
|
|
}
|
|
|
|
.buy-button {
|
|
flex: 1;
|
|
margin: 5px;
|
|
}
|
|
|
|
.buy-buttons-container {
|
|
flex: 2 2;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
/* Visual Deck View */
|
|
.decklist__section-heading-container {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.decklist__toggle-view {
|
|
font-size: 0.8em;
|
|
padding: 2px 8px;
|
|
cursor: pointer;
|
|
margin-left: auto;
|
|
}
|
|
|
|
.decklist__card-grid {
|
|
display: none;
|
|
flex-wrap: wrap;
|
|
gap: 4px;
|
|
}
|
|
|
|
.decklist__card-grid__item {
|
|
position: relative;
|
|
}
|
|
|
|
.decklist__card-grid__image {
|
|
height: 200px;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.decklist__card-grid__count {
|
|
position: absolute;
|
|
top: 4px;
|
|
left: 4px;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
color: white;
|
|
border-radius: 4px;
|
|
padding: 2px 6px;
|
|
font-size: 0.85em;
|
|
font-weight: bold;
|
|
}
|