Skip to content

Modifier some css identifier#530

Closed
eerison wants to merge 1 commit into
satnaing:mainfrom
eerison:add-post-class
Closed

Modifier some css identifier#530
eerison wants to merge 1 commit into
satnaing:mainfrom
eerison:add-post-class

Conversation

@eerison

@eerison eerison commented Jun 10, 2025

Copy link
Copy Markdown
Contributor

Description

  • Added .post class
  • Moved #back-button to main div

Types of changes

  • Others (any other types not listed above)

Further comments

I am adding post post class just to easier identifier post div

- Added .post class
- Moved #back-button to main div
id="main-content"
class:list={[
"mx-auto w-full max-w-app px-4 pb-12",
"post mx-auto w-full max-w-app px-4 pb-12",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @satnaing
is it ok to add post class here, just to easier identify post div?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, why do we need this?

@eerison eerison Jun 10, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because I would like to use

@utility max-w-app {
  @apply max-w-full;
}

but for post and back-button, do like this

.post,
#back-button {
  @apply max-w-3xl;
}

and I did not see other way to make this work :/

any suggestion?

edit: without make custom changes in .astro files 👀

class="mx-auto flex w-full max-w-app items-center justify-start px-2"
>
<LinkButton
id="back-button"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why tho?
This might not be a good idea as we're targeting back-button button component in the script.

id="main-content"
class:list={[
"mx-auto w-full max-w-app px-4 pb-12",
"post mx-auto w-full max-w-app px-4 pb-12",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, why do we need this?

@eerison

eerison commented Jun 10, 2025

Copy link
Copy Markdown
Contributor Author

I don't know if it is a good approach.

but I could override the css importing a custom css with

@import "tailwindcss";

#main-content {
  @apply max-w-3xl;
}

div:has(#back-button) {
    @apply max-w-3xl;
}

I guess it won't bring many conflicts for future updates :)

@eerison eerison closed this Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants