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

tailwindui css layout support - colon is not accepted by the pattern #34430

Closed
in-session opened this issue Oct 26, 2021 · 6 comments · Fixed by #34559
Closed

tailwindui css layout support - colon is not accepted by the pattern #34430

in-session opened this issue Oct 26, 2021 · 6 comments · Fixed by #34559
Assignees
Labels
Area: Framework feature request Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.

Comments

@in-session
Copy link
Contributor

I would like to use tailwindui for a project, but unfortunately it is currently not possible because no colon is allowed within the htmlClass.

<!-- Width of 16 by default, 32 on medium screens, and 48 on large screens -->
<div class="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-2xl"></div>

<referenceContainer name="header-wrapper" htmlClass="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-2xl" htmlId="header" />

Element 'referenceContainer', attribute 'htmlClass': [facet 'pattern'] The value 'page-wrapper flex relative md:p-0' is not accepted by the pattern '[a-zA-Z][a-zA-Z\d\-_]*(\s[a-zA-Z][a-zA-Z\d\-_]*)*'. Line: 1306

Is there a way to make this compatible?

@m2-assistant
Copy link

m2-assistant bot commented Oct 26, 2021

Hi @in-session. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@in-session
Copy link
Contributor Author

vendor\magento\framework\View\Layout\etc\elements.xsd

    <xs:simpleType name="htmlClassType">
        <xs:restriction base="xs:string">
            <xs:pattern value="[a-zA-Z][a-zA-Z\d\-_:]*(\s[a-zA-Z][a-zA-Z\d\-_:]*)*"/>
        </xs:restriction>
    </xs:simpleType>

@m2-community-project m2-community-project bot added Progress: PR in progress Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Priority: P2 A defect with this priority could have functionality issues which are not to expectations. and removed Progress: ready for grooming labels Nov 7, 2021
@Nurgiel
Copy link

Nurgiel commented Dec 2, 2021

It's really annoying that you can't use some tailwind classes in .xml files.

Is there a way to add a plugin/preference to override this regex from elements.xsd file? Otherwise when is this going to be released as a patch?

Issue was opened for the first time over two years ago and no solution has been given since then:
https://community.magento.com/t5/Can-Magento-do/XSD-regex-override/td-p/312167

<xs:include schemaLocation="urn:magento:framework:View/Layout/etc/elements.xsd"/>
is hardcoded all over the place in vendor/magento/framework/View/Layout/etc/ body.xsd, layout_generic.xsd, layout_merged.xsd, page_layout.xsd, ui_settings.xsd...

@in-session
Copy link
Contributor Author

in-session commented Dec 2, 2021

@Nurgiel Has already been published as PR and will hopefully be integrated in the next release.
#34559
magento/magento2-page-builder#791

@engcom-Alfa engcom-Alfa added Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Framework Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Dec 27, 2021
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-2055 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Dec 27, 2021

✅ Confirmed by @engcom-Alfa. Thank you for verifying the issue.
Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Framework feature request Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
Development

Successfully merging a pull request may close this issue.

4 participants