-
Notifications
You must be signed in to change notification settings - Fork 38
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
Non-recognized root class aborts element processing #230
Comments
In this specific case it should be possible to fix this issue, as the utility classes are not valid mf2 root classnames (i.e. they have a number in). Hopefully tailwind and similar libraries don’t introduce any classes which would clash with mf2 classnames (e.g. I’ll try to take a look at it over the next few days. Aside: one could argue that using tailwind in this way is contrary to the ideal of semantic markup which microformats2 builds upon, and that using single-use classnames like this is barely any different from just using inline .profile-photo {
.w-32();
.h-32();
} <div class="h-card">
<img class="u-photo profile-photo" alt="Jon Doe"
src="/image.jpg"/>
</div> Exactly why even this solution would be preferable to just .profile-photo { width: 32px; height: 32px; } eludes me, but I’m not judging ;) |
I merged a fix, which will be in the next point release. Thanks for bringing this issue to our attention! |
Are there useful test cases here to add to the cross language test suite?
…On Fri, 25 Feb 2022, 9:04 pm Barnaby Walters, ***@***.***> wrote:
I merged a fix, which will be in the next point release. Thanks for
bringing this issue to our attention!
—
Reply to this email directly, view it on GitHub
<#230 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAYFQGZKPU7UATQQYOX5R3U47VHJANCNFSM5PDPUJNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
@kevinmarks could be, yes — for example, checking that <div class="h-card">
<img class="u-photo w-32 h-32" alt="Jon Doe"
src="/image.jpg"/>
</div> parses correctly to {
"items": [
{
"type": [
"h-card"
],
"properties": {
"name": [
"Jon Doe"
],
"photo": [
"/image.jpg"
]
}
}
],
"rels": {},
"rel-urls": {}
} Additionally, tests which ensure valid parsing of property vendor prefixes (which may contain numbers) and property name tail strings (which may not) e.g. |
Hi! I'm trying to implement microformats2 in my website, which uses Tailwind as CSS framework. In that framework, there are classes such as
h-4
,h-12
etc (specifyingheight
CSS property on element).Problem is: when I try to validate my h-card, the parsing of an element is aborted when those Tailwind classes are present. A small example follows:
The
photo
property is not recognized; but if one removesh-32
class,photo
is recognized. I tried this example on two different pages: Barnaby Walters' and pin13.net, and the results are the same.It seems php-mf2 (used on those 2 pages) aborts the processing of an element when it finds a non recognized root class (which, in this case, isn't even a microformats2 class). This is problematic, I think, since HTML classes are not used only by microformats2.
The text was updated successfully, but these errors were encountered: