-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#5: Update class names, use scss #6
base: master
Are you sure you want to change the base?
Conversation
To streamline sass, now it has a package.json. |
Never mind, I see you already published it. |
Sorry for not replying earlier. I've been very busy on other projects. You've included several things in one PR.
I'm a server side developer, and have limited experience with the latest front-end tools. You've added a I look at all the dependencies that you've added for what is a small one-file library. I'm guessing the target audience for this package is someone (like me?) who wants a particular theme/cms/package to work in RTL, and has enough skill to copy/paste some CSS into a template. Isn't this just massive overkill? |
BTW - I no longer use this package myself. These days, I just add a class So if you want to take ownership of this project, I'd be happy to transfer it to you. |
👍 np, thanks for getting back to this.
I do have another branch without all the scss stuff etc, but I do prefer scss. I'll get back to that in a second.
They're the same thing, really. The only difference is whether blocks are defined by brackets or white space.
I work pretty heavily with nodejs, and am pretty familiar with npm and yarn. I started using yarn a few months ago, and can't imagine going back. In my experience/opinion, it's light years ahead in terms of speed and usability, and has some really nifty advanced features (like workspaces). Npm users could still build this branch; the only difference would be that npm uses npm.lock, so if someone added a package with npm I'd add it again with yarn to make sure the lockfile is up to date. All that said, for such a tiny project, with 2 source files and 1 dependency, it really doesn't make much of a difference, and I could just drop the lock file.
Only one dependency was added, on dart-sass.
For sure, that's a prime target audience. That's why I "bit my tongue" and added the compiled css (generated from the scss) to source control, so that any one who finds this repo can easily copy and paste the css into where ever they want. Should the README be updated, to point more clearly to the compiled css? I wouldn't want to scare anyone away. I do want to to point out that currently the .css has "raw" unicode, (there's an open issue sass/dart-sass#568 to toggle that). But there is another audience. For example, where I work, we use scss with webpack and all that other wonderful nodejs CI stuff, we could use the niceness of scss.
Well... here's my take; For example: Currently all the unicode code points are hard coded. Fontawesome actually defines scss variables for each icon. So instead of writing "\f177", you could write "$fa-var-long-arrow-left".
Most importantly for my usage: we identify rtl/ltr with classes on the document body (.dir_rtl, .dir_ltr). So it's nice to be able to change one thing in one place, and have the css use different selectors for direction. Which is possible in scss - I made a function which takes the two selectors as arguments, and uses those variables.
Also, in places where you have Another useful thing is nesting, where
becomes
Currently, the start and end styles for a given icon are placed together. If we switch to using variable names, it might make sense to take care of all the rtl styles, and than all the ltr styles, and rely on the variables for clarity. Than we could use file nesting, which would remove a lot of visual noise, which becomes more important if we want to add support for all the new fontawesome icons.
I dunno. If yes, I think we should agree on future direction before transferring. TL;DR |
Assists #5.
I think scss is awesome.
If you don't want it, my master branch doesn't have it, and I can make a new PR.
Note that this PR only updates those classes which you already have to match font-awesome version 5. It does not add new icons.