Re: Discussing possibilities of a 'CSS-ignore' rule.

On 9/20/12, Ketan Singh <singh.ketan7@gmail.com> wrote:
[...]

> I've been working on a project this week, which has a PHP script that is
> meant to open a popup window

Don't use popup windows.

that contains a 'template' with dynamically
> generated values plugged in. The template was originally generated by
> Microsoft Word 2010, using the 'html, featured' (or something like that)
DOn't use html generators. Microsoft word for creating html is a
particularly bad choice.

> saving option. The reason why I went for it instead of using CSS on HTML
> markup, is because of the complexity of the tables that had to be created,

Don't use tables.

> and I am sort of running short of time.

> The tricky part started when I decided to insert the project's theme
> 'header' and 'footer' into that popup, which required me to include the css
> file on it as well. Now that the external css file is hooked up with with

> the popup, I have kind of, lost control on the styling that was originally
> generated by Microsoft word. Though most of the template markup has inline
> definitions, still some parts are not showing up as expected.
>
As expected or as desired?

> This makes me feel a need for something that could be called 'css-ignore'.
> E.g. If I had a *div *with id 'my_div', I could have used something like
> #my_div{  css-ignore:external;  } which could have asked the browser not to
> associate any external style sheets with 'my_div'. The css-ignore rule
> could have possible values such as 'inline', 'internal', 'external', which
> could make the browser ignore css of a certain 'kind' for a particular
> selection of elements.
> I guess, there are many possible ways this can be achieved, many of them
> kind of 'hackish' like tweaking it using jQuery;

jQuery fills a void akin to of MS Word's HTML generator. If you're
interested in learning more about jquery, it's intended uses,
implementations, the code itself, these aspects and with their
associated problems have been reviewed many times on
comp.lang.javascript.

In a nutshell: Eschew generators, jQuery, and tables. DOn't ship it in
a rush; you'll just get mired in code debt.

Regards,
-- 
Garrett
Twitter: @xkit
personx.tumblr.com

Received on Friday, 21 September 2012 16:44:55 UTC