PCP Style – A New Idea for Better Stylesheets

So Pondered this idea today…. PCP (PCP CSS Preprocessor).

Fundamentally, I want to create a preprocessor to get CSS that parses released your stylesheet within the server-side and uses HTTP_USER_AGENT to determine deviations from normal CSS, then replaces that W3C-compliant CSS having browser-specific CSS and also spits out the result.

And here is how it’ll do the job.

Think about you have this particular HTML (below). And let’s say you want to style your #page content that they are 500px wide with 20px padding as well as a 10px border, centered to the page, with word justified left. W3C can have you do the following:

HTML:
< html>
< head>
< title> PCP Style< /title>
< website rel=" stylesheet" type=" text/css" href=" key. css" media=" all" />
<! --if lte IE 6>
< website rel=" stylesheet" type=" text/css" href=" ie6. css" media=" screen" />
<! endif-->
< /head>
< body>
< div id=" page" >
< p> PCP is a bomb! < /p>
< /div>
< /body>
< /html>

Here’s some of our main CSS report, which works with regard to W3C-compliant browsers.

Code:
div#page
size: 500px;
padding: 20px;
boundary: 10px;
margin: 0 auto;

Due to box-model misinterpretation by means of certain user-agents, for example LTE IE6, we will need to add a conditional include of CSS to be able to implement a box-model hack, because follows:

Code:
body
text-align: center;

div#page
size: 560px;
text-align: still left;

So my concept is actually that we skip the many above hassle and build a CSS preprocessor that would simplify the development of CSS so it’s on the order of these:

HTML:
< html>
< head>
< title> PCP Style< /title>
< website rel=" stylesheet" type=" text/css" href=" key. pcp" media=" all" />
< /head>
< body>
< div id=" page" >
< p> PCP is a bomb! < /p>
< /div>
< /body>
< /html>

Code:
div#page
size: 500px;
padding: 20px;
boundary: 10px;
margin: 0 auto;

The PCP track would get interpreted to the server, and would utilize the HTTP_REFERRER to decide the page it’s via, and the HTTP_USER_AGENT to view what hacks want to be implemented to make the page look right with the requesting browser. Then it could render the CSS using whatever hacks are usually necessary and serve out the right content as Content-Type: text/css.

Obtain me some feedback… this would be a massive undertaking, but I believe there’s a real need for a technology such as this!!!

Well that could be awesome. Would the many hacks stored from a database, is that what exactly you mean Be able to work, buddy!: -P

Will be the AGENTS always accurate
Do they always determine the precise browser

Helpful idea.
Should you have your own server, I don’t understand why you couldn’t try.

Here’s what exactly I’m thinking… the PCP rendering engine can have a C library that would parse the XHTML using DOM and also the CSS using any CSS parser. It would in that case have different profiles for each of the different browsers, with conditions for the many deviations from W3C complying, such as field model deviation, alpha graphic loaders, etc. for example.

Influenced by the user’s cell phone browser, the preprocessor would likely convert the CSS into a format that would render properly in the client. It would after that cache that rendering of the CSS on that server, so type. pcp would get multiple CSS editions: style-ie60. css, style-ie70. css, style-ff09. css, for example., and it would serve out the correct one in upcoming requests to minimize load within the server.

The only problem with all it is I see it to be a HUGE undertaking – one that will require a large development and maintenance effort.

POST definitely can’t proceed it alone… though I could probably get the idea started!!

I’ll aim to prototype something covering the next few several weeks and post our results!

Oh yea, also, I was thinking we may have an Eclipse plugin for development. That could allow people to generate W3C valid CSS in the more efficient approach.

Steven…

That obvious question is definitely " do you’ve got a life"

Only kidding… this internet/scripting stuff sometimes gets mind-boggling.

Rendering in different browsers is often a big problem right now. Mainly between IE6 in addition to everyone else. Nonetheless, as browsers get an increasing number of compliant to w3c standards, I think there will be less of a requirement of your idea in a few years. So you should decide if it would worth the effort and still have a real need regarding it.

All the bashing IE has taken over the years has finally put a fire uder their ass to receive their browser as long as snuff, and it took developers just like Firefox, Safari, in addition to Opera to light source that fire.

It would litereally take a couple of years or so for you to develop your strategy from concept to reality. There would be immense testing involved and it also has to job right! What you wouldn’t want can be your pcp adding much more bugs then we curently have, hence the endeavor of testing most situations and identifying solutions to them all.

Nonetheless, most of your own terminology sounds confusing if you ask me and maybe it is easier than I think. If so, ARRIVE AT WORK!!!

(My mom always said I believe to much at any rate! )

Absolutely no, you’re right, it might be a couple man-years regarding effort. My goal would be to prototype it considering the box model, and generate adequate interest there to buy a couple dozen other developers to help build browser profiles and obtain it 100% done within a matter of months as opposed to years.

You’re crazier than I am!!! But I think you have a great idea, in case you choose to move forward with this specific, I hope it goes because you predict!

This entry was posted in Web Design and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *