• 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:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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
     
    Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
    Gift giving made easy with the permaculture playing cards
    https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
    reply
      Bookmark Topic Watch Topic
    • New Topic