Disallow text wrapping in the "Total" cell in Item Getting Guide

The table layout algo can get a bit funky about how it assigns extra
space, I want to encourage things like "Total: 5 items" etc not to
wrap, esp in the Dyeworks case where it's quite long!
This commit is contained in:
Emi Matchu 2024-06-20 13:55:04 -07:00
parent 3d6abc84dd
commit 341a8dd89c
2 changed files with 7 additions and 4 deletions

View file

@ -56,6 +56,9 @@
th th
text-align: left text-align: left
.name-cell
text-wrap: nowrap
.thumbnail-cell img .thumbnail-cell img
outline: 1px solid $soft-border-color outline: 1px solid $soft-border-color

View file

@ -15,7 +15,7 @@
%thead %thead
%tr %tr
%td %td
%th %th.name-cell
Total: #{nc_total_for @items_needed[:nc_mall]} NC Total: #{nc_total_for @items_needed[:nc_mall]} NC
(#{pluralize @items_needed[:nc_mall].size, "item"}) (#{pluralize @items_needed[:nc_mall].size, "item"})
@ -52,7 +52,7 @@
%td.thumbnail-cell %td.thumbnail-cell
= image_tag "https://images.neopets.com/items/mall_80x80_cleaning.gif", = image_tag "https://images.neopets.com/items/mall_80x80_cleaning.gif",
alt: "Dyeworks Hue Brew Potion" alt: "Dyeworks Hue Brew Potion"
%th %th.name-cell
Total: #{dyeworks_nc_total_for @items_needed[:dyeworks]} NC Total: #{dyeworks_nc_total_for @items_needed[:dyeworks]} NC
+ +
%span.price-breakdown{ %span.price-breakdown{
@ -124,7 +124,7 @@
%thead %thead
%tr %tr
%td %td
%th{colspan: 2} %th.name-cell{colspan: 2}
Total: #{pluralize @items_needed[:np].size, "item"} Total: #{pluralize @items_needed[:np].size, "item"}
%tbody %tbody
- @items[:np].each do |item| - @items[:np].each do |item|
@ -206,7 +206,7 @@
%table.item-list %table.item-list
%thead %thead
%td %td
%th{colspan: 2} %th.name-cell{colspan: 2}
Total: #{pluralize @items_needed[:other_nc].size, "item"} Total: #{pluralize @items_needed[:other_nc].size, "item"}
%tbody %tbody
- @items[:other_nc].each do |item| - @items[:other_nc].each do |item|