xtk / X

The X Toolkit
http://www.goXTK.com
Other
793 stars 266 forks source link

Extract styles into stylesheet file. #118

Open medihack opened 11 years ago

medihack commented 11 years ago

Hi Daniel.

Can I convince you to extract the hard coded stylesheets in caption.js and progressbar.js into its own stylesheet file? I know, users must then include it manually in their html, but the styles could then be much easier overwritten or edited. There would also be single location where to place new styles in future development. I would be happy to make a pull request. What do you think?

haehn commented 11 years ago

Hi Kai,

that's a good idea! I would prefer if this could be kind of optional. So we could check if css is already defined in the X.caption.init_ method and then don't re-define the styles. If not, we define the styles as right now.

Do you think this is possible?

Thx.

medihack commented 11 years ago

The only thing I can think of is to check if the style position: absolute was already set (using getComputedStyle) for the element after the class x-tooltip resp. xtk-progress-bar was added.