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
Content slider CSS class collision #6420
Comments
Could we instead use something like |
No, that would not really solve the class collision issue. It would just be a workaround in the grid.css style sheet, but the problem will likely occur in other places, too. |
Yes, we left out all content elements that currently use wrappers. The intention was to implement them as 'real' nested content elements as soon that feature has landed. 🙂 |
What about always adding a class to each content element in the base template? Then we could target content elements directly in the CSS instead of relying on search/prefix? (On that note: Why are we using Too bad we reverted the content element CSS naming in 817e867. 🙈 Otherwise you would have gotten a nice |
That does not solve the name collision issue, either, I‘m afraid. Once the slider element is converted, it would have the |
The inner classes of the other new twig content elements change too, so I’d guess that we would change the inner class name when converting the slider to a new element controller. |
We cannot change the inner class unless we also adjust the slider JS. That‘s why I suggest to do it right away. |
Unfortunately, #6435 does not fix the issue. 😞 Accordion elements get the class
Because
I guess that would have prevented this issue. Maybe we should use |
I think we should move away from selctors like AFAIK we use If we want to be extra careful regarding BC, we could move from |
I think we could also just get rid of the grid.css in an upcoming minor release and have people come up with better solutions for that. 😬 |
Eventually fixed in contao-components/contao#16. |
Description ----------- This PR adds a modern content slider element now that we have nested fragments. 🥳 To prevent naming collisions with the legacy content slider (see #6420), the new element uses a new Contao component: https://swiperjs.com Because Swipe.js has been dead for years now, this step was long overdue. Commits ------- d441034 Add a modern content slider element bfc06db Wrap the HTML markup in a separate block bb55aa0 Rename "swiper" to "slider" 5c7466f Use separate blocks for styles and scripts a0dbf4f Add a unit test f8c08e8 Rename the element again to prevent conflicts with Swipe.js dd526b7 Adjust the tests a23491e Use <button> elements for the next and prev buttons b439190 Fix the tests fdf68f4 Make the slider attributes editable 449b5f4 Fix the tests cb3e1a0 Add more blocks in the template fef16d7 Adjust the button attributes 3901c90 Add the `_attributes` suffix where missing Co-authored-by: ausi <martin@auswoeger.com>
Affected version(s)
5.0.0+
Description
Our content slider has an inner DIV with the CSS class
content-slider
:contao/core-bundle/contao/templates/elements/ce_sliderStart.html5
Line 8 in 0059b15
Since the new Twig templates use
content-{type}
as naming schema, we have to adjust the Contao CSS framework accordingly:But adding
.mod_article *[class*="content-"]
would also apply the grid styles to the content slider DIV, therefore we should rename the CSS class of the content slider. @contao/developers Any objections?BTW, we did not stumble upon this earlier, because the slider content element has not been converted to a controller yet. @m-vo Did we leave it out on purpose?
The text was updated successfully, but these errors were encountered: