Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Theme Table container and base for Tailwind Custom Themes #1583

Merged

Conversation

marcheffels
Copy link
Contributor

⚡ PowerGrid - Pull Request

Welcome and thank you for your interest in contributing to our project!. You must use this template to submit a Pull Request or it will not be accepted.


Motivation

  • Bug fix
  • Enhancement
  • New feature
  • Breaking change

Description

This Pull Request adds Tailwind Custom Theme container and base.

Related Issue(s): #_____.

Documentation

This PR requires Documentation update?

  • Yes
  • No
  • I have already submitted a Documentation pull request.

@luanfreitasdev
Copy link
Collaborator

Thank you @marcheffels

@luanfreitasdev
Copy link
Collaborator

I'm afraid this is a breaking change. If the theme was previously published and the class was not extended, there will be a break.

@luanfreitasdev luanfreitasdev marked this pull request as draft June 5, 2024 23:35
@marcheffels
Copy link
Contributor Author

Hi @luanfreitasdev, I'm understanding why you cannot marge this PR.

The problem I'm trying to solve is that the current theme is breaking my site.
The negative margin on the container causes the container size to be larger than the parent div.

My current workaround for my site is that I wrap all the tables in a separate div with overflow-hidden.

Suggested solutions:

1. Remove negative margin:
Container changes:
From class="-my-2 overflow-x-auto sm:-mx-3 lg:-mx-8"
To class="overflow-x-auto"
Base changes:
From class="p-3 align-middle inline-block min-w-full w-full sm:px-6 lg:px-8"
To class="align-middle inline-block min-w-full w-full"
(I tried to find a reason for the negative margin. If there is a reason, please explain it to me.)

2. Add "overflow-hidden" to the wrapper:
Change parent of container:
From class="flex flex-col"
To class="flex flex-col overflow-hidden"

Are any of the suggested solutions acceptable?
Then I can create a new PR.

Thanks.

Copy link
Collaborator

@luanfreitasdev luanfreitasdev left a comment

Choose a reason for hiding this comment

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

Can you check for a bootstrap theme too?

@marcheffels
Copy link
Contributor Author

Can you check for a bootstrap theme too?

in Bootstrap theme I can't find any container, base div tag or negative margin, so I believe this problem exists only in Tailwind theme.

@marcheffels marcheffels marked this pull request as ready for review June 13, 2024 11:31
@luanfreitasdev luanfreitasdev self-requested a review June 13, 2024 13:49
@luanfreitasdev luanfreitasdev merged commit 989407a into Power-Components:5.x Jun 13, 2024
42 checks passed
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.

None yet

2 participants