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

need to select tabarray label string in CSS #354

Closed
sdetweil opened this issue May 24, 2021 · 3 comments
Closed

need to select tabarray label string in CSS #354

sdetweil opened this issue May 24, 2021 · 3 comments

Comments

@sdetweil
Copy link
Contributor

sdetweil commented May 24, 2021

in my form design, I have a list of items, some support multiple of the same type, some not, some have one entry, some more

the tab label of 'Item 1' doesn't mean anything and is confusing. I would like to hide it. (the tab label)

but CSS doesn't provide a selector for the contents of an element, only for the value of an attribute
(:has() selector has been approved, but not yet implemented in any browser)
the generated tab label code is

<a class="draggable tab" data-toggle="tab">Item 1</a>

IF there was an attribute, then it could be selected, like this

<a class="draggable tab" data-toggle="tab" val="Item 1">Item 1</a>

would u be interested in this change?

my tab array
if one tab and val='Item 1'
no tab shows
Screenshot at 2021-05-24 11-42-24

in one item with one tab val NOT default 'Item 1'
Screenshot at 2021-05-24 11-42-32

if more than one tab
Screenshot at 2021-05-24 11-42-40

@sdetweil
Copy link
Contributor Author

sdetweil commented May 24, 2021

then u can target the a item like this

.possibly-hidden-tab div:nth-child(2)  > div > div >div >ul >li:only-child >a[val*="Item 1"] {
  display: none;
}

using "htmlClass":"possibly-hidden-tab" in the form

@tchapi
Copy link
Member

tchapi commented May 25, 2021

Hi @sdetweil,

Yes, I think that change is meaningful. Let me try to give it a go this week, I'll keep you updated

@sdetweil
Copy link
Contributor Author

thank you

piorek94 pushed a commit to piorek94/jsonform that referenced this issue Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants