question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

2.0: Back to the basics (again)

See original GitHub issue

TL;DR – now that browser support has improved for custom props and CSS grid, Shoelace 2.0 will go back to its roots and once again be highly customizable without the need for any sort of build process.


As Shoelace evolved, it became clear that we weren’t quite ready for certain CSS features in production. I feel I was a bit too premature with pushing Custom Properties and CSS Grid Layout when Shoelace was released back in July, but I think we’re ready to move these features to the mainstream.

Edge 16 was released on October 16, and with it brings full support for Custom Properties and CSS Grid Layout. This doesn’t include IE11, but I’m OK with that at this point.

Here’s what I’d like to do moving forward:

  • Remove all cssnext-specific features so you don’t have to build Shoelace to use it.
  • Rework the build process so the dist contains custom properties. This will make Shoelace easier to use and, once again, customizable via CDN.
  • Split variables into their own component files again, making Shoelace much more modular and extensible. For example, you’ll be able to include a single third party .css file that inherits your theme/component styles automatically, even from a CDN!
  • Address #12 by requiring component classes (e.g. <button class="btn">) for default components. My updated thoughts on this: styling is easier, implementing is easier, and the “namespace” has some benefits.

This is a bit of a backpedal, but I think it’s finally time. Of course, this will introduce a breaking change in terms of browser support, so the new version will be 2.0.

Thoughts?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:11
  • Comments:23 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
claviskacommented, Mar 1, 2020

Stencil uses Rollup under the hood which handles tree-shaking. The generated components can be consumed in a couple ways:

  1. Lazy loaded – you load a <script> and just use the components. They’re loaded asynchronously, so only what’s used is what’s loaded. I believe this is how Ionic consumes their Stencil components.

  2. Custom Elements Bundle – you load and register each component yourself. This is one of Stencil’s @next features but an important one that I’d like to expose for sure.

In either case, you’re only loading what you actually need rather than the entire component library. 👍

BTW, here’s a (scaled down to fit) screenshot of buttons. This is one component. Each variation is made simply by changing props and/or adding slots.

Screen Shot 2020-03-01 at 12 30 44 PM
2reactions
NullVoxPopulicommented, Dec 17, 2018

I think getting rid of the build process and using all native modern features would be amazing!

For those who still want IE11 or other old browsers… just… don’t use the new version of shoelace? there is nothing wrong with staying an old version for compatibility reasons.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Back To Basics 2.0 - Wranglerstar - YouTube
Back To Basics. My heart breaks when I think of skills that have been lost to my generation. It's time to get back...
Read more >
Back to Basics 2.0 - Amazon.com
Play from Amazon Music's free applications on iOS, Android, Kindle Fire, Fire TV, Amazon Echo, PC, Mac, Roku and Sonos.
Read more >
Listen to [Free Release] Warface - Mash-up 2.0 (Back Again) by ...
Listen to [Free Release] Warface - Mash-up 2.0 (Back Again) by WarfaceOfficial playlist on desktop and mobile.
Read more >
Going Back to Basics: Instructional Strategies - TeachHUB
Giving students a structured way with stem questions or academic vocabulary to discuss what they are learning or to work through a problem...
Read more >
Back to Basics (Again) with Enterprise Collaboration - CMSWire
Back to Basics (Again) with Enterprise Collaboration · Mobile and Smartphones. Have you made progress on your mobile strategies? · Enterprise ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found