Ok, I need a new thread for my HTML processing program

Click For Summary
SUMMARY

The discussion centers on the need for a structured approach to writing an HTML processing program, emphasizing the importance of organizing CSS effectively. The author critiques the practice of embedding styles directly within HTML elements, likening it to poorly formatted word documents. Instead, the author advocates for a CSS strategy that relies on class-based styling, which enhances maintainability and clarity. The conversation highlights the necessity of a well-defined plan for developing helper functions to streamline the CSS integration process.

PREREQUISITES
  • Understanding of CSS best practices
  • Familiarity with HTML structure and semantics
  • Experience with writing JavaScript functions for HTML processing
  • Knowledge of CSS frameworks and their specific styling requirements
NEXT STEPS
  • Research CSS class-based styling techniques
  • Learn about JavaScript functions for manipulating HTML and CSS
  • Explore best practices for organizing CSS files
  • Investigate the use of CSS preprocessors like SASS or LESS
USEFUL FOR

Web developers, frontend engineers, and anyone involved in creating or maintaining HTML and CSS structures will benefit from this discussion.

Jamin2112
Messages
973
Reaction score
12
My old thread was getting messy and I realized I needed to go back to square 1 and write up a plan. So here's an outline of the plan:
23m5t04.jpg


2t5r7.jpg


I will add to this thread as I write the helper functions and encounter any problems. Criticism greatly appreciated.
 
Technology news on Phys.org
And here's my self-explanatory procedure for writing the formatted CSS into a string:

2uq2mo1.jpg
 
Im not really sure if this is relevant for you or not, but in general you would probably not want to structure a CSS file like you do above. If you do, then it is similar to inserting style="" attributes on each elements (this is similar to the naive way of formatting a word document by applying style directly to each chunk of text).

CSS usually shines best when your style classes only depends on one or two levels of html structure context above the current element, although sometimes more is required when you need to adjust a specific frameworks use of CSS in one particular situation. Using CSS the "right way" is similar to formatting a word document by tagging paragraphs as body text, headlines, etc. and they style those tags instead.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
22
Views
3K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K