Tool to merge 3 CSS files - asp.net

Merging huge CSS files is huge pain,
Hi i found some question asked on the same line. I tried some of the tools but they end up merging line by line rather than on the basis or CSS rules.
Now i thought i should right one good program to do following,
1. read CSS file convert in XML
2. sort it on the basis of CSS rule
Now write one more program to consume 3 XML files find different classes and merge the files nicely based on CSS rules.
How ever that turned out to be good amount of work and i hope there must be someone who must have faced this problem before me and solved it clean way.
Please add your thoughts and suggestions, I would love to know the tool for this however i would also love to know how to design/code for this kind of tool? Am i thinking on right track ?
Thanks All,

There is a free tool called CSS Merge. Have you tried it?

Since order is important in CSS, it is difficult to merge files more sensibly than simply concatenating them. Certainly, this can't be done in the general case. In a specific case you might be able to produce a tool that can do it.

Related

How to use syntax highlighting in next js?

I am able to parse the markdwon with the help of remark and remark-html. How can I add syntax highlighting features for the code element?
I've been searched for TWO whole days trying to use remark/rehype ecosystem on syntax highlighting which is way more complex to use. I'm still working on searching, it's better to avoid remark/rehype ecosystem and try another method.
Here I share list of my search, just give you some subjective perspective so that you won't waste you too much time on things that not working. None of them will work as you expected, and their sample code are obscure or just broken codes.
https://github.com/remarkjs/remark-highlight.js
They move to support rehype. Are you a big fan of them wanna move as well?
https://github.com/sergioramos/remark-prism
You will get this error: Module parse failed: Unexpected character '�'
https://github.com/torchlight-api/remark-torchlight
They states on their website: 🚨 This client is still very much a work in progress. Please open issues! 🚨View it on github at github.com/torchlight-api/remark and this link is invalid.
https://github.com/rehypejs/rehype-highlight
It force you to use rehpye althought you can you remark-rehype for you to transfer easily. However, debug your code once you encounter some error will be helpless.
sample code use third-pary v-file to read file showing their code is working but not. and it reads html file not markdown file.
It's hard for you to grasp their concept to use their plugins to easily. It waste most of you valuable time to think what they think.
I give up remark/rehype ecosystem and stay away from them. Good luck! :)

Split up Firebase Firestore Security Rules into separate Files?

Is there a way to split Firestore Security Rules (firestore.rules) into separate / multiple files?
I would like to do a structure like so:
index.rules // imports all the rules
users.rules
posts.rules
comments.rules
helperFunctions.rules
// ... and so on
My firestore.rules file is getting quite big and this would make working with it much, much easier.
Unfortunately, I don't think it's possible at this time out of the box. However, I'm with you 100% with this issue.
There may be a rough workaround using npm (or whatever cli tool). Following this answer, you may be able to have a head, multiple inserts, and a foot. If you're able to find all files matching a pattern, you can concat them to the head, then concat the foot, ultimately naming this file firestore.rules.
OneLunch Man's answer inspired me to sit down and write a small Node.js module that shall make live easier organizing your Firestore rules:
https://github.com/lupas/firestore-rulez
As #OneLunch Man proposed above, this combines the different files into one single firestore.rules file. Additionally, and if configured, it adds some helper functions that you don't have to define yourself.
Hope it helps someone :)
I love the simplicity of security rules, though I hope organizing them will be even easier in the near future. But I'm very sure it will, right Frank? ;-)
Btw: I'll leave the question unanswered, maybe there's even better solutions?

Text into shapes with shape-inside or SVGs

I'm looking for a real solution to the problem of making a text flow inside a CSS-shape or inside an SVG-shape.
On the internet, you can find many partial solutions like:
https://www.html5rocks.com/en/tutorials/shapes/getting-started/
https://www.sarasoueidan.com/blog/css-shapes/index.html
All of them use "shape-outside" which is amazing for many purposes but in some cases it doesn't work well. That because these ways use two shapes with "shape-outside" and not a single CSS-shape with "shape-inside".
So I'm asking my self:
Does really exists "shape-inside"?
If not, is it going to be available soon?
Does something similar exist with SVGs?

IntelliJ: Refactoring causes whole file reformat

When I perform a refactoring (extract variable for instance) in a .mxml file, IntelliJ reformats the contents whole <mx:Script> element. We don't want it to do that because it makes the commits noisier than it needs to be. This in turn complicates merges.
Part of the problem is that we're transitioning from Eclipse to IntelliJ - which has generally been a big improvement - and we're still getting our code style sorted out. So there are some inconsistencies in the format actually present in a particular file. A problem, which to some degree pre-dates our migration. We are working on getting a standard format published, which will help. But we don't need the merge conflicts. This is out of character for IntelliJ. How do we prevent this?
It's a known bug, you can track it at http://youtrack.jetbrains.com/issue/IDEA-64985.
It may help if you change your code style to be similar between Eclipse and IDEA so that reformat doesn't change it.

Comparing and rationalizing CSS - not file or diff based

I'm in the process of taking a couple of separate asp.net applications, and combining them.
One problem is rationalizing the CSS between the two app - app1 has two css files, while app2 has about 8 of them. Much of the CSS between the two apps is the same, but there are some differences. I'm looking for a tool to compare all the elements of each app, and show what's missing, what's different, etc. Ideally the output would be 3 files: Common, app1 and app2, but I won't be that fussy if it can just show me the differences between the two apps.
Does such a tool exist?
If you hate downloading tools, there's an online version of css comparer here http://www.alanhart.co.uk/tools/compare-css.php
It provides a comparison of css class files between two files
I don't know of a stand-alone tool tailored for this specific purpose. There's a PHP class called "CSS Comparer", but I have no idea how easy it is to use. The screenshot on that page looks promising though.
Personally, I would probably just concatenate all the files together, so that you have one file for each app, and then run a diff on them. To make it even easier, you could run both files through something like CSSTidy or do some imaginative file processing with search/replace and sorting. That could get all the declarations in the same order in both files, so the diff would be clearer.
Combine all of these files into a single file and give it a run through a CSS optimizer or compressor. An optimizer should see all of your duplicate selectors and weed them out.
I'd recommend YUI's compressor, but there are plenty of web-based compressors/optimizers available, too. Here's one and another. YMMV with them, but a good Google search can turn up a bunch more.
Normally I'd recommend diff. Since you explicitly write that you are looking for something "not diff based", maybe you could describe why diff does not help you.
Then others might be able to propose something different.

Resources