refactor: extract redundant max-width into utility#525
Conversation
Extract redundant max-width into a universal tailwind utility class. By doing so, the width of the layout in different pages can be customized easily.
|
Great idea! |
|
Hi @satnaing thank you to move this feature forward, I am trying to test your branch locally, but I am getting this error edit: I guess it is related with #521 |
|
It is doing exactly what I was wanting ❤️ in case I want to build another layout like mantioned here: #436, it is possible 🥳 Just one point but it is not direct related with this PR, But maybe we could replace those |
|
Hi @eerison
Yes, exactly. @utility max-w-app {
@apply max-w-3xl lg:max-w-5xl xl:max-w-full;
}I don't recommend doing "full-screen" for blog posts tho; as it will affect the readability and user experience. |
I guess it's a good start 😁 |
|
And what about Hr component? |
You meant something like |
|
Yeah i know I can remove the Component, but the problem with this is, I gonna change files from astro-paper repository, and I want to avoid this, because it gonna be a way easier to update my repository... if i keep doing custom changes in many files I gonna get many conflicts :/ For this reason I would like to change this via css, because I could just keep changes in one file. |
Deploying astro-paper with
|
| Latest commit: |
6dc3609
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c25f4eae.astro-paper.pages.dev |
| Branch Preview URL: | https://refactor-extract-max-width-f.astro-paper.pages.dev |
|
@eerison |
Hey @satnaing just a question is it possible apply different |
Technically, yes. |
* refactor: extract redundant max-width into utility Extract redundant max-width into a universal tailwind utility class. By doing so, the width of the layout in different pages can be customized easily. * docs: update docs for modifying `max-w-app` utility (cherry picked from commit 5f72b93)
* refactor: extract redundant max-width into utility Extract redundant max-width into a universal tailwind utility class. By doing so, the width of the layout in different pages can be customized easily. * docs: update docs for modifying `max-w-app` utility

Extract redundant max-width into a universal tailwind utility class. By doing so, the width of the layout in different pages can be customized easily.
Demo
extracted-max-w-demo.mp4
Types of changes
Checklist
Remark
Obviously, there's a problem with BackToTop button.
Currently, we have to update the position property inside the
BackToTopbutton when we update themax-w-app.There's gonna be a PR for that.
Related PR & discussion
#490 #436