Giter VIP home page Giter VIP logo

Comments (6)

ungoldman avatar ungoldman commented on June 14, 2024

I was thinking of trying sheetify. I initially tried using sheetify to import photon on this project (and normalize on another electron project) and got an error so I went the easy route for now. I think in the case of this app it makes sense to bundle components with their style (would be nice for each component to own its little piece of CSS). If you can find a way to make it play nice with electron then I say go for it.

from hyperamp.

ungoldman avatar ungoldman commented on June 14, 2024

To clarify, I think sheetify probably works fine for isolated pieces of CSS brought in template strings, but seems to fall down when importing from node modules while operating in the electron runtime.

from hyperamp.

bcomnes avatar bcomnes commented on June 14, 2024

I'll poke around and see if I can get photon going with sheetify. Its not a huge surprise that the two don't work together great.

I've never really like the css framework approach to css (one big css blob that attaches itself to the dom with generic component class name recipes). Its confusing to see whats going on as class hierarchies mix, and they usually use a ton of awkward css tricks like clear fixes everywhere, global selectors that litter the dom tree with :before:after's etc.

I'm inclined to move towards doing component level css, mainly due to the endured pain of global css disasters I've run into in the past. This is going to require porting a bunch of photon css over to whatever system we put in place, but I feel this will put us in a better position in terms of organization and control over styling in the future. This will introduce a CSS build step to make a bundle, which is a bit of a bummer, but will open us up to a bunch of handy post-css transforms like prefixing.

I can start this process if its something you are willing to go along with.

from hyperamp.

ungoldman avatar ungoldman commented on June 14, 2024

Totally willing -- I've actually wanted to fork photon and break it into something more easily consumable by electron apps for a while. Also I think it's basically abandoned at this point -- lots of very old unmerged/unreviewed PRs that might be worth pulling in ourselves in a fork.

npm install photonkit! maybe

from hyperamp.

ungoldman avatar ungoldman commented on June 14, 2024

Thanks for getting sheetify working @bcomnes! I guess next step is trying to encapsulate style at the component level rather than keeping it in a hodgepodge of classes at the index level.

from hyperamp.

bcomnes avatar bcomnes commented on June 14, 2024

We're doing sheetify for now! We can isolate things as we go.

from hyperamp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.