-
Notifications
You must be signed in to change notification settings - Fork 69
Conversation
hah, found some beautiful glitches - hold on with the merge for a lil bit ok? |
return html` | ||
<label for="dat-import" class="relative dib pa0 b--none ${prefix}"> | ||
<input name="dat-import" | ||
type="text" | ||
placeholder="Import dat" | ||
onkeydown=${onKeyDown} | ||
class="input-reset"> | ||
${linkIcon} | ||
${icon('link', { class: 'absolute top-0 bottom-0 left-0' })} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about this syntax?
icon('#link.absolute.top-0.bottom-0.left-0')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I kinda like that; very close to hyperscript's class / id shorthand - I think having that at some point would definitely make sense. Nice ✨
I'd probably make sure there'd be full consistency with hyperscript tho:
icon('link.absolute.top-0.bottom-0.left-0#some-id')
but yeah that's nit picking. I like it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like having the 'class' dict, it also is just as simple and already works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
annnnd... package! - https://github.com/yoshuawuyts/parse-class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah nah, agree - this would only work for icons right now; buttons is harder - gonna leave this for a bit
@Kriesse ran into an SVG styling issue; not sure what changed but could you perhaps take a look - styling SVGs has never been my forte. Once that's fixed this should be ready to merge. |
@yoshuawuyts the intro screen and a few other small misalignments are fixed, ready to merge from my side! Preview: |
Awesome, just ran through it and it's looking 💯 - merging! |
This implements part of #280,
namely buttons and icons. It creates a slightly more intuitive API to create
elements, and decouples the icons from the buttons itself making them more
flexible. All elements should be accessible and reusable between projects.
The app runs and all event seem to work as expected which means I caught all
instances I think. Thanks!
API