Skip to content

Commit

Permalink
Fix incorrect calculation of tailwind spacing
Browse files Browse the repository at this point in the history
Originally, 90 = 90rem = 90 * 16 = 1440.
So after we add more spacing variants,
the variant we actually want is 1440 / 4 = 360.
I also increase the maximum number to 360.
  • Loading branch information
louischan-oursky committed Jul 9, 2024
1 parent a27b78c commit dcfdaae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion authui/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
maxWidth: (theme) => theme("spacing"),
spacing: () => {
const spacing = {};
for (let i = 0; i <= 300; i += 0.5) {
for (let i = 0; i <= 360; i += 0.5) {
spacing[i] = `${i * 0.25}rem`;
}
return spacing;
Expand Down
2 changes: 1 addition & 1 deletion resources/authgear/templates/en/web/__page_frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{{ template "__message_bar.html" . }}
<div id="loading-progress-bar"></div>
{{ template "__tutorial.html" . }}
<div class="max-w-22.5 m-auto">
<div class="max-w-360 m-auto">
<div class="grid grid-cols-6 tablet:grid-cols-12 desktop:grid-cols-12 gap-x-4 auto-rows-auto mx-4 tablet:mx-4 desktop:mx-6 mb-8">
<div class="col-start-1 col-span-6 tablet:col-start-4 tablet:col-span-6 desktop:col-start-5 desktop:col-span-4">
<div class="page-header">
Expand Down
2 changes: 1 addition & 1 deletion resources/authgear/templates/en/web/__wide_page_frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{{ template "__message_bar.html" . }}
<div id="loading-progress-bar"></div>
{{ template "__tutorial.html" . }}
<div class="max-w-22.5 m-auto">
<div class="max-w-360 m-auto">
<div class="grid grid-cols-6 tablet:grid-cols-12 desktop:grid-cols-12 gap-x-4 auto-rows-auto mx-4 tablet:mx-4 desktop:mx-6 mb-8">
<div class="col-start-1 col-span-6 tablet:col-start-3 tablet:col-span-8 desktop:col-start-4 desktop:col-span-6">
{{ template "__header.html" . }}
Expand Down
2 changes: 1 addition & 1 deletion resources/authgear/templates/en/web/app_not_found.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{{ template "__message_bar.html" . }}
<div id="loading-progress-bar"></div>
{{ template "__tutorial.html" . }}
<div class="max-w-22.5 m-auto">
<div class="max-w-360 m-auto">
<div class="grid grid-cols-6 tablet:grid-cols-12 desktop:grid-cols-12 gap-x-4 auto-rows-auto mx-4 tablet:mx-4 desktop:mx-6 mb-8">
<div class="col-start-1 col-span-6 tablet:col-start-4 tablet:col-span-6 desktop:col-start-5 desktop:col-span-4">
<div class="page-header">
Expand Down

0 comments on commit dcfdaae

Please sign in to comment.