|
|
|
|
|
by heyplanet
2558 days ago
|
|
This has issues: <list>
<hstack spacing=s>
<div class="icon"></div>
<text>Westminster</text>
<spacer></spacer>
<text>0.5 miles</text>
</hstack>
....
It is more complex then it needs to be, it puts the styling into into the html, it kills all semantic meaning and pollutes the global namespace of element names.It should be: <my-cities>
<my-city>
<city-name>Westminster</city-name>
<city-distance>0.5 miles</city-distance>
</my-city>
....
And then simply style the custom attributes to your liking via css. If these "primitives" would use classnames instead of element names, their styles could be added like this: <my-cities class=pylon-list>
<my-city class=pylon-hstack>
<city-name>Westminster</city-name>
<city-distance>0.5 miles</city-distance>
</my-city>
....
|
|