CSSStylingWithTemplating

(Difference between revisions)
Jstola (Talk | contribs)
(Created page with 'This document describes the current implementation of CSS Styling in projects that are using templating frameworks (TF). Its focus is to describe when DOM Tree view resp. merged …')
Newer edit →

Revision as of 11:03, 27 March 2013

This document describes the current implementation of CSS Styling in projects that are using templating frameworks (TF). Its focus is to describe when DOM Tree view resp. merged Navigator view is used and when CSS Styles view shows 'Run file' button and when it shows the style information of the selected element.

We distinguish three basic cases: no TF, client side TF (for example, AngularJS) and server side TF (for example, JSP or PHP).

No Templating Framework

Support for projects that are not using templating framework is implemented already in NetBeans 7.3 and remains the same in the latest development builds:

  • DOM Tree is not shown
  • Navigator is used to navigate among elements
  • If the opened file is inspected in the browser then
    • Navigator shows the merged view
    • CSS Styles shows the style information for the selected element
  • If the opened file is not inspected in the browser then
    • Navigator shows the source view
    • CSS Styles shows the 'Run file' button

Client-side Templating Framework

If the "main" inspected file is opened in the editor then

  • DOM Tree is not shown
  • Navigator shows the merged view
  • CSS Styles shows the style information for the selected element

If a fragment/template (used by the main file) is opened in the editor then

  • DOM Tree is shown (and hides/covers Navigator that shows just source view)
  • CSS Styles shows the style information for the selected element

Notes: the fragments/templates are recognized by monitoring what resources the inspected page requested. Originally we considered a merged view for this situation but this doesn't seem to be feasible. In general, it is not possible to recognize the template in the DOM and even with some knowledge of the TF in use there are serious problems (like what to do when the template appears several times etc.) Anyway, we should use DOM Tree until we have anything better.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo