• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Java Data Structure for HTML Class Selectors and CSS style Sheet?

 
Ranch Hand
Posts: 239
2
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I'm developing a very intricate web page - an interactive Html table - and have factored most things out. But I'm stuck with an awkward way of declaring the styles and generating the required Css style sheet.

This has probably been solved before but....

I have:
  • an Enum of Css class selector names, used to generate both the Html and the Style Sheet
  • several Css value Enums used to generate the Style Sheet
  • complex Css value Enums for themes used to generate the Style Sheet


  • I then use a builder pattern to generate the Style Sheet, a small extract below , the class CssSheetBuilder has a method for every CSS property


    What I would like, is to have an enum listing each css class selector and declare it using value pairs... something like this


    This is a bit verbose, and also doesn't allow me to alter the style declaration based on a selected theme.

    My question is a bit disjointed, but if anybody could provide any pointers on how to go about this that would be appreciated
     
    You guys wanna see my fabulous new place? Or do you wanna look at this tiny ad?
    The new gardening playing cards kickstarter is now live!
    https://www.kickstarter.com/projects/paulwheaton/garden-cards
    reply
      Bookmark Topic Watch Topic
    • New Topic