b3by / atom-clock

Place a clock or calendar in your status bar
MIT License
96 stars 90 forks source link

Removed custom style and refactored clock elements #36

Closed ftm closed 7 years ago

ftm commented 7 years ago

I've added the inline-block class to the main clock element so it is displayed in the same as the built in packages on the status bar, removing the need for the extra CSS. I also changed the layout of the elements as can be seen below.

Before: screen shot 2017-06-27 at 13 19 37

After: screen shot 2017-06-27 at 13 17 45

With the new layout, the icon class is no longer being applied to the span displaying the time so the time no longer moves when the icon is enabled due to the margin-right from the icon class as can be seen below. I've also refactored the specs to take the new element layout into account

Before, see how the time moves to the left slightly: icon clock margin moving before

After, see how the time stays still: icon clock margin moving after

b3by commented 7 years ago

Thank you for the pull request! This is great! Maybe (just maybe), the package load time will speed up a bit, as the style file doesn't need to be fetched from the disk any longer!

ftm commented 7 years ago

You're welcome, if you're looking to speed up load time it might be better to just delete the .less file so it's not trying to load an empty file

b3by commented 7 years ago

Sure thing. I deleted both the less file and the one for the keybinding, as they were useless. I will check with timecop if something changes.