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

[Bug] Add background to selectable <tr> table elements #183

Closed
eryc-cc opened this issue Aug 12, 2022 · 5 comments · Fixed by #252
Closed

[Bug] Add background to selectable <tr> table elements #183

eryc-cc opened this issue Aug 12, 2022 · 5 comments · Fixed by #252
Assignees
Labels
🐛 bug Something isn't working released on @beta

Comments

@eryc-cc
Copy link
Contributor

eryc-cc commented Aug 12, 2022

Summary

We need to add a background to the <tr> elements on hover/click.

The problem is: border-radius doesn't work with <tr> elements, and the ::before approach is not working.

Requires more CSS testing.

Original comment:

No need to add a border, just the border-radius, I think in tailwind is rounded
Maybe rounded-sm? Should be 4-6px max... more than that will look too rounded

Added the border radius but it doesn't seem to affect the highlight. I'm using background color for the highlight so that might be the issue.

Ugh, tables are so annoying to work with... 😅

Here's the problem: border-radius doesn't work on <tr> elements: https://stackoverflow.com/questions/4094126/how-to-add-border-radius-on-table-row

Try something like this:

<tr className={`before:content-['${title}'] before:block before:absolute before:-inset-1 before:bg-blue-100 before:opacity-0 hover:before:opacity-1 before:rounded transition ease-in-out relative cursor-pointer`} key={index} onClick={(event: any) => {

Originally posted by @pixelsbyeryc in #177 (comment)

@eryc-cc eryc-cc added the 🐛 bug Something isn't working label Aug 12, 2022
@eryc-cc eryc-cc self-assigned this Aug 12, 2022
@0-vortex
Copy link
Contributor

Definitely never use tables :D

@OgDev-01
Copy link
Contributor

What if I switch the table into a div and avoid the use of tr and td, will that be an acceptable solution?

Just a suggestion b4 I dive deep into this issue🙌

@eryc-cc
Copy link
Contributor Author

eryc-cc commented Aug 22, 2022

What if I switch the table into a div and avoid the use of tr and td, will that be an acceptable solution?

Just a suggestion b4 I dive deep into this issue🙌

I think that's what we should do... What do you think, @chadstewart?

@chadstewart
Copy link
Contributor

What if I switch the table into a div and avoid the use of tr and td, will that be an acceptable solution?
Just a suggestion b4 I dive deep into this issueraised_hands

I think that's what we should do... What do you think, @chadstewart?

Probably for the best. I'm already avoiding using table html elements because of this issue.

bdougie pushed a commit that referenced this issue Sep 6, 2022
github-actions bot pushed a commit that referenced this issue Sep 6, 2022
## [1.4.0-beta.6](v1.4.0-beta.5...v1.4.0-beta.6) (2022-09-06)

### 🐛 Bug Fixes

* Add background to selectable tr table ([#252](#252)) ([7d6ae16](7d6ae16)), closes [#183](#183) [#289](#289)
* Contributor card overlap on smaller devices ([#298](#298)) ([777f6ba](777f6ba)), closes [#290](#290)
@github-actions
Copy link

github-actions bot commented Sep 6, 2022

🎉 This issue has been resolved in version 1.4.0-beta.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this issue Sep 6, 2022
## [1.4.0](v1.3.0...v1.4.0) (2022-09-06)

### 🧑‍💻 Code Refactoring

* Add types to useRepositoriesList hook ([#277](#277)) ([4f1a771](4f1a771))

### 🍕 Features

* Add download CSV funtionality to Reports page ([#286](#286)) ([ada79d3](ada79d3))
* **footer:** swap out footer text ([#296](#296)) ([737df5b](737df5b))
* Update Scatter Chart Legend ([#260](#260)) ([309ef62](309ef62))

### 🐛 Bug Fixes

* Add background to selectable tr table ([#252](#252)) ([7d6ae16](7d6ae16)), closes [#183](#183) [#289](#289)
* Contributor card overlap on smaller devices ([#298](#298)) ([777f6ba](777f6ba)), closes [#290](#290)
* correct netlify build supabase redirect url ([#283](#283)) ([0b2b80a](0b2b80a))
* Filter dropdown can only be closed by clicking on the filter button ([#299](#299)) ([bce1f8e](bce1f8e)), closes [#292](#292)
* Fixing issues with TopNav and Highlight Card ([#294](#294)) ([218f30d](218f30d)), closes [#287](#287) [#291](#291)
* grammar for header description ([#279](#279)) ([a019912](a019912))
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this issue Aug 17, 2023
## [1.4.0-beta.6](open-sauced/app@v1.4.0-beta.5...v1.4.0-beta.6) (2022-09-06)

### 🐛 Bug Fixes

* Add background to selectable tr table ([#252](open-sauced/app#252)) ([7d6ae16](open-sauced/app@7d6ae16)), closes [#183](open-sauced/app#183) [#289](open-sauced/app#289)
* Contributor card overlap on smaller devices ([#298](open-sauced/app#298)) ([777f6ba](open-sauced/app@777f6ba)), closes [#290](open-sauced/app#290)
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this issue Aug 17, 2023
## [1.4.0](open-sauced/app@v1.3.0...v1.4.0) (2022-09-06)

### 🧑‍💻 Code Refactoring

* Add types to useRepositoriesList hook ([#277](open-sauced/app#277)) ([4f1a771](open-sauced/app@4f1a771))

### 🍕 Features

* Add download CSV funtionality to Reports page ([#286](open-sauced/app#286)) ([ada79d3](open-sauced/app@ada79d3))
* **footer:** swap out footer text ([#296](open-sauced/app#296)) ([737df5b](open-sauced/app@737df5b))
* Update Scatter Chart Legend ([#260](open-sauced/app#260)) ([309ef62](open-sauced/app@309ef62))

### 🐛 Bug Fixes

* Add background to selectable tr table ([#252](open-sauced/app#252)) ([7d6ae16](open-sauced/app@7d6ae16)), closes [#183](open-sauced/app#183) [#289](open-sauced/app#289)
* Contributor card overlap on smaller devices ([#298](open-sauced/app#298)) ([777f6ba](open-sauced/app@777f6ba)), closes [#290](open-sauced/app#290)
* correct netlify build supabase redirect url ([#283](open-sauced/app#283)) ([0b2b80a](open-sauced/app@0b2b80a))
* Filter dropdown can only be closed by clicking on the filter button ([#299](open-sauced/app#299)) ([bce1f8e](open-sauced/app@bce1f8e)), closes [#292](open-sauced/app#292)
* Fixing issues with TopNav and Highlight Card ([#294](open-sauced/app#294)) ([218f30d](open-sauced/app@218f30d)), closes [#287](open-sauced/app#287) [#291](open-sauced/app#291)
* grammar for header description ([#279](open-sauced/app#279)) ([a019912](open-sauced/app@a019912))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working released on @beta
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants