css: refactor CSS to use Tailwind-style utility classes.

Refactor CSS to use standard Tailwind-style utility classes instead of
ad-hoc rules. This eliminates a lot of single-purpose rules for specific
UI elements and standardizes margins to be more consistent throughout
the site.

Utility classes are defined manually on an as-needed basis instead of
importing Tailwind as a whole. Naming conventions mostly follow
Tailwind's conventions, otherwise they follow Bootstrap.

* https://tailwindcss.com/docs/
* https://getbootstrap.com/docs/5.0/utilities/spacing/
This commit is contained in:
evazion
2021-02-15 18:28:53 -06:00
parent 7b0fee6333
commit 1e80540a04
49 changed files with 245 additions and 450 deletions

View File

@@ -5,10 +5,10 @@
<%= render "users/secondary_links" %>
<div id="c-user-upgrades">
<div id="a-new" class="fixed-width-container">
<div id="a-new" class="fixed-width-container mx-auto">
<% if @user_upgrade.is_gift? %>
<h1>Gift Account Upgrade</h1>
<h1 class="text-center mb-4">Gift Account Upgrade</h1>
<% if @user_upgrade.recipient.is_platinum? %>
<p><%= link_to_user @recipient %> is already above Platinum level and can't be upgraded!</p>
@@ -16,7 +16,7 @@
<h6>You are gifting this upgrade to <%= link_to_user @user_upgrade.recipient %>.</h6>
<% end %>
<% else %>
<h1>Upgrade Account</h1>
<h1 class="text-center mb-4">Upgrade Account</h1>
<p>Upgrading your account gives you exclusive benefits and helps support
<%= Danbooru.config.canonical_app_name %>. Your support helps keep the
@@ -26,7 +26,7 @@
their profile page and look for a "Gift Upgrade" link.</p>
<% end %>
<table id="feature-comparison">
<table id="feature-comparison" class="w-full text-center table-md">
<thead>
<tr>
<th></th>
@@ -36,10 +36,10 @@
</tr>
</thead>
<tbody>
<colgroup id="labels"></colgroup>
<colgroup id="basic"></colgroup>
<colgroup id="gold"></colgroup>
<colgroup id="platinum"></colgroup>
<colgroup id="labels" class="w-1/4"></colgroup>
<colgroup id="basic" class="w-1/4"></colgroup>
<colgroup id="gold" class="w-1/4"></colgroup>
<colgroup id="platinum" class="w-1/4"></colgroup>
<tr>
<td></td>
<td>Free</td>