Skinr Plugins for Form-based CSS Styles

awmckinley's picture

Hello! I've recently started using Skinr 1.x on a handful of sites, and I love it! Combined with Panels Everywhere, we've really got some nice flexibility in site design. As I work, it strikes me how useful it would be to be able to create a module that inserts a number of form items into the Skinr form so that we could for modify the styling of individual regions, panes, and blocks (say: adjusting margin-top for a pane, or z-index, or setting absolute positioning).

Three questions:

1. Should I work towards a patch for Skinr 1.x that would allow this or should I wait for 2.x?
2. Is Skinr the best place to put something like this or would the creation of another module be more appropriate?
3. Is there already a module that does this and I've missed it?

Thanks!

Comments

Hi awmckinley! Let me try to

Jacine's picture

Hi awmckinley!

Let me try to respond here ;)

As I work, it strikes me how useful it would be to be able to create a module that inserts a number of form items into the Skinr form so that we could for modify the styling of individual regions, panes, and blocks (say: adjusting margin-top for a pane, or z-index, or setting absolute positioning).

This can be done now, though it seems like you are trying to move in the direction of making Skinr apply inline CSS properties or make it an actual CSS Editor. While I can see how that might be useful in some cases, Skinr isn't the place to do this IMO. Skinr allows you to create a "framework" of classes and reuse them. Inline CSS is not something it will ever do, and achieving this sort of things with classes isn't exactly efficient. :)

It really wasn't designed to do this sort of thing, BUT if you wanted to, you could do this now:

skinr[margin_top][title] = Margin Top
skinr[margin_top][type] = select
skinr[margin_top][description] = Select a top margin.
skinr[margin_top][options][1][label] = 0
skinr[margin_top][options][1][class] = margin-top-0
skinr[margin_top][options][2][label] = 1em
skinr[margin_top][options][2][class] = margin-top-1
etc...

As you can see, this would become sloppy very quickly.

To answer your questions:

  1. The 1.x version is on its way out as soon as we get some more people testing the 2.x version.
  2. Another module would be more appropriate.
  3. The only other module that I know if that will allow you to affect CSS in the UI is CSS Injector.

I hope that helps. :)

Thanks for the quick

awmckinley's picture

Thanks for the quick response! I've actually made a Margin Top skin like you're suggesting, and it has become sloppy. The reasoning is that I'm trying to find a way to allow the people who maintain the site to potentially move the panels around and have the capability of making those kind of small adjustments (I don't want them to have to worry about learning CSS, which is one reason why I don't want to use CSS Injector for this).

Maybe I'll see if I can put something useful together in a module...

Anyways, thank you so much for all your hard work!

Skinr

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week