2

I've been tasked with reproducing the look and feel of an intranet site in SharePoint, at first I was thinking no problem just mod a Master page and voila.

The problem occurred when I opened the source of the site and saw that they are using 12 disparate CSS files that override each other, and are written in the worst way possible.

My question is is there a tool that can take the mess and generate the resulting HTML so I don't have to manually.

  • Base.css for example sets BODY width to 90%
  • custom.css then sets it to 960px !important
  • Mod.css lastly tries to set it to 100%

I would need it to look at this and generate BODY with the style to set the width to 960px

2
  • 1
    This is impossible unless you make every tag a <div> or something; there's no way you can tell which tag to generate from a CSS selector that isn't a tag. There is a program called CSSTidy that will clean up your CSS for you by removing duplicate/overridden selectors and whatnot Commented Oct 17, 2013 at 12:04
  • 1
    Why not add the CSS files since the task is to reproduce it. Commented Oct 17, 2013 at 12:08

3 Answers 3

3

You can do this using chrome's developer tools: Right click and inspect the element and then click on the computed tab on the far right top corner .

enter image description here

It will give you the styling that the element has after all the overrides and such.

Sign up to request clarification or add additional context in comments.

Comments

0

As a starting point, you coud use window.getComputedStyle() for obtaining such information.

Comments

0

Have a look at: https://code.google.com/p/instyle/

It seems like it does what you need.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.