You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Datetime and TimeSpan shapes are currently rendering as strings but in an HTML context we should try to render it wrapped with a <time /> tag.
We should probably allow to use a W3C accepted HTML element to make this easier for everyone. It should use <time /> tag in which we can pass/render a datetime or a timespan. At least make it an option to render as a HTML element or a date text but in the end the first should be used more often.
<timedatetime="PT15H10M">15 hours and 10 minutes ago</time>
It should render a <time> tag optionally only and it should be backward compatible with what we currently have. Meaning that by default it should not render a time tag.
The text was updated successfully, but these errors were encountered:
Looks complicated just to save writing a tag directly. From your examples I couldn't figure out if these were actual html tags or tag helpers in razor. I would assume people would also be confused.
Or maybe create new shapes that render specific tags, like TimeShape
Yeah, somehow DateTime and TimeSpan are distinct in C# but maybe it is not in HTML. So a TimeShapes that would render a <time></time> tag but that would take a TimeSpan or DateTime as parameter.
The other idea was to simply add a param to the actual taghelpers and add an alternate render.
The Datetime and TimeSpan shapes are currently rendering as strings but in an HTML context we should try to render it wrapped with a
<time />
tag.We should probably allow to use a W3C accepted HTML element to make this easier for everyone. It should use
<time />
tag in which we can pass/render a datetime or a timespan. At least make it an option to render as a HTML element or a date text but in the end the first should be used more often.Examples:
For a Datetime shape
Liquid:
Razor:
Should render optionally as :
For a timeSpan
Liquid:
Razor:
Should render optionally as :
It should render a
<time>
tag optionally only and it should be backward compatible with what we currently have. Meaning that by default it should not render a time tag.The text was updated successfully, but these errors were encountered: