SeanJM / atom-css-clean

A plugin for Atom which sorts and aligns CSS and SASS
MIT License
20 stars 2 forks source link

Removing URI #6

Closed ArmandoValencia closed 8 years ago

ArmandoValencia commented 8 years ago

Failing to clean absolute url's starting with "http://" and leaves them incomplete.

Example in the images: Left (selected) : code to clean Right : clean code with messed url. codemess

Is this a bug?

SeanJM commented 8 years ago

I think so, can you paste the original CSS so I can test it?

ArmandoValencia commented 8 years ago

`* ======================================================== / / SITE FOOTER / / ======================================================== */

.site-footer { margin:0; border-top: 1px solid #BB8B41; background:url('http://www.idventiva.com/wp-content/uploads/back-container-black.jpg') center right #101010; background-repeat:no-repeat; color: #b68a3a; font-weight:bold; padding: 10px 30px 10px; height:60px; width: 100%; position:fixed; bottom:0; text-align: center; font-family: 'Montserrat', sans-serif; font-size:0.8em; vertical-align:middle; overflow:hidden; z-index:3;}

.socialist {float:left;} .socialist ul {list-style-type:none; list-style-position: inside; text-indent:0px; margin:0; padding:0;} .socialist ul li {float: left; height:40px; width:40px; margin:0 2px; padding:0; background-color:#101010; text-indent: 100%; white-space: nowrap; overflow: hidden;} .socialist ul li a {height:40px; width:40px; display:block; background-size:cover; transition: background 1s;} .socialist ul li.icon-facebook a{background-image:url('http://www.idventiva.com/wp-content/uploads/icon_facebook.png'); background-repeat:no-repeat;} .socialist ul li.icon-twitter a {background-image:url('http://www.idventiva.com/wp-content/uploads/icon_twitter.png'); background-repeat:no-repeat;} .socialist ul li.icon-instagram a {background-image:url('http://www.idventiva.com/wp-content/uploads/icon_instagram.png'); background-repeat:no-repeat;} .socialist ul li.icon-facebook a:hover{background-image:url('http://www.idventiva.com/wp-content/uploads/icon_facebook_hover.png'); } .socialist ul li.icon-twitter a:hover{background-image:url('http://www.idventiva.com/wp-content/uploads/icon_twitter_hover.png'); } .socialist ul li.icon-instagram a:hover{background-image:url('http://www.idventiva.com/wp-content/uploads/icon_instagram_hover.png'); }`

SeanJM commented 8 years ago

Fixed

SeanJM commented 8 years ago

By the way, if you're curious at all to find out what caused the problem it was how I split properties string.split(':'); I would take the left side and right the side, without taking into consideration there was the possibility of a colon being present there. This was fixed by making the right side string.split(':').slice(1).join(':')