[PLUGIN] CSS Import

Post your completed addons to share with the community

Post » Sat Jul 19, 2014 12:55 am

McKack wrote:CSS Import
1.0 - January 18th 2013


Background
I thought I'd share this plugin I made for some personal projects. It's somewhat redundant since most objects support CSS natively but it can be helpful if you want a more global approach to styling things. Also very handy since you can do CSS in preview/realtime.

Usage
The primary method of importing a CSS is automatically doing so by including it in your project and defining the name of the CSS file in the plugin properties.


The alternative method is including it in your project, then using the Import CSS file action through an event whenever you like.
Just remember to remove any CSS files that share styles (if using multiple CSS files) to avoid any conflicts.



P.S. There's built-in protection from accidentally importing the same CSS file several times.

Preview


Downloads
Plugin: css_import.zip
Example: css_import.capx

Credits/Disclaimer
The plugin was basically Frankenstein'd from Pode's HTML Div plugin (because it contained CSS stuff) + code scavenged from the web. So credits to Pode and this site specifically for making this possible.

I have no real coding skills and don't think I'd be able to make a plugin from scratch :) Now, this also means I can't guarantee it working flawlessly. I've only tested it in Chrome on Windows 7, so if it breaks down and blows up your computer, I warned you!

Enjoy!McKack2013-04-27 01:37:13


something wrong with your download link ?? is it hijaked or something ?
B
12
S
5
G
4
Posts: 176
Reputation: 4,384

Post » Sun Jul 20, 2014 2:44 pm

@EmpowerMe
@istavang
Sorry about all this. It would appear solidfiles have turned to dubious methods of earning money. The big green download button leads to some shady downloader/installer while the tiny link underneath it is the clean file as far as I can tell. Either way, I've replaced the links with safe ones.
I'll never be using solidfiles again!
B
88
S
33
G
7
Posts: 31
Reputation: 8,425

Post » Sat Jul 26, 2014 7:52 am

McKack wrote:@EmpowerMe
@istavang
Sorry about all this. It would appear solidfiles have turned to dubious methods of earning money. The big green download button leads to some shady downloader/installer while the tiny link underneath it is the clean file as far as I can tell. Either way, I've replaced the links with safe ones.
I'll never be using solidfiles again!


thanks , coz u have a awsome plugin there :)
B
12
S
5
G
4
Posts: 176
Reputation: 4,384

Post » Fri Jan 09, 2015 8:28 am

Does anyone know if it's possible to modify an Sprite using css?
Thanks! :D

@McKack
B
8
S
1
Posts: 13
Reputation: 394

Post » Fri May 29, 2015 8:36 am

clauddia06 wrote:Does anyone know if it's possible to modify an Sprite using css?
Thanks! :D

@McKack

Not as far as I know.
I believe @Ashley once said the text object can't be styled with CSS because it is rendered differently from control objects, and I assume that might be the case with sprites as well.

What do you want to do to the sprite, by the way?
B
88
S
33
G
7
Posts: 31
Reputation: 8,425

Post » Fri May 29, 2015 10:22 am

CSS only styles DOM elements, and everything apart from the form controls is rendered directly in to a canvas so doesn't have its own DOM element, and therefore cannot be styled by CSS. That's a good thing, because DOM has a big performance overhead, so everything's way faster this way. You still have WebGL shaders which can do a lot though!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat May 30, 2015 2:51 pm

There you have it.
Thanks for the quick explanation, Ashley!
B
88
S
33
G
7
Posts: 31
Reputation: 8,425

Post » Thu Jun 04, 2015 9:59 pm

can you like use bootstrap css here? lel
B
14
S
3
Posts: 57
Reputation: 879

Post » Fri Jun 05, 2015 8:17 am

This helped a lot!

I used it to change the place-holder color of my forums, worked perfectly.
B
12
S
2
Posts: 39
Reputation: 1,069

Post » Sat Aug 22, 2015 9:52 pm

Can we use bootstrap css? XD
B
14
S
3
Posts: 57
Reputation: 879

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: bcit, Bitmichael and 3 guests