PHP Used CSS Generator

Zaprto Objavljeno pred 3 letoma/leti Plačilo ob prevzemu
Zaprto Plačilo ob prevzemu

We're wanting to build a PHP Generator that reads the classes, and IDs and selectors used on-page and remove all CSS not used.

We want this custom made, please do not use a library or someone else's attempt at this.

How it works:

Reads a CSS file, reads the HTML, Detects the dom elements on page and recompiles the CSS into a new file.

Example HTML

<div id="pricing" class="container my-3 pink">

<div class="row">

<div class="col-12 col-md-6 col-xl-3 mb-4 mb-md-0">

<h2>Hello</h2>

<p><span data-label="This is a label">This is</span> some text.</p>

<p>testing</p>

</div>

</div>

</div>

Example CSS:

#tables, #pricing { display: block; }

.pink { background: pink; }

.pink:hover p { color: red; }

.yellow { background: yellow; }

.pink p, .yellow p { color: black; }

.pink > h2 { margin: 0 }

p, span, h4, h3, a { line-height: 1.2em }

p:nth-child(odd) { padding-left:20px; }

.my-3, .mb-4 { padding: 4em; }

span["data-label"] { padding-left: 20px; }

span["data-label"]::before, span["abcde"]::before { content: ''; position:absolute; }

I wrote this just now, it isn't meant to look pretty but it shows a good example of CSS this is what that css should come out like because some css doesn't exist in the HTML, it also shows before, nth-child, and other type of selectors that need to be detected.

This is what the above CSS should come out as:

#pricing { display: block; }

.pink { background: pink; }

.pink:hover p { color: red; }

.pink p { color: black; }

.pink > h2 { margin: 0 }

p, span { line-height: 1.2em }

p:nth-child(odd) { padding-left:20px; }

.my-3, .mb-4 { padding: 4em; }

span["data-label"] { padding-left: 20px; }

span["data-label"]::before { content: ''; position:absolute; }

Things removed:

#tables

.yellow

.yellow p

h4, h3, a

span["abcde"]::before

These don't appear in the HTML so got removed.

Please keep in mind, There are global items such as *, *::before, *:hover, span>* things like this that need to be considered.

PHP CSS HTML HTML5

ID projekta: #26116543

Več o projektu

19 predlogov Oddaljen projekt Aktiven pred 3 letoma/leti

19 freelancerjev ponuja v povprečju za $450 na tem delu

ykarora26

Hello sir, I read all description in detail. You are looking for wanting to build a PHP Generator that reads the classes, and IDs and selectors used on-page and remove all CSS not used I have much experience in web Več

$250 AUD v 1 dnevu
(421 ocen)
8.3
techwelfare

Hi we are a team of experienced php developers having 14 years of working experience in WordPress. Best Regards Techwelfare

$454 AUD v 12 dneh
(239 ocen)
7.6
vitalykuzin

Hi there. Nice to meet you. I'm an expert PHP Developer. I have rich experience in PHP, CSS, etc. I can start work immediately now and can provide you perfect result for your requirements. Please let's discuss your pro Več

$500 AUD v 7 dneh
(34 ocen)
6.3
RusselExpert

Greetings. Thanks for your post. I have fully understood your goal. As a senior php developer, I can deliver satisfactory product in a short time. Please contact me for futher discussion. Thanks & Regards.

$500 AUD v 7 dneh
(29 ocen)
6.0
alexsamdev

Hi, how are you? Thanks for reading me. I have checked your description carefully. As I am a senior web developer so I am very interested and confident on your project. I have rich experienced in almost web languages ​ Več

$300 AUD v 7 dneh
(20 ocen)
5.7
ibragim5555

Hello, Mr Danny! I hope you having a wonderful day! I've read your project description carefully and I've analyzed your requirements basically. I can finish this project perfectly in short term according to your requir Več

$300 AUD v 4 dneh
(25 ocen)
5.6
benliao

Hi I have read your project details carefully. I have rich experience in php css html I can carry out your project perfectly Thanks Liao

$500 AUD v 5 dneh
(19 ocen)
5.5
VakiYT

Hello, my name is Vladimir and i am Web Developer from Serbia. I can help you with completing your project.

$500 AUD v 7 dneh
(44 ocen)
5.6
vitalysamsonovd

Hello, Danny M How are you? I am a full-stack developer who has rich experience in web development. Especially I have great knowledge and experience in PHP, Laravel, Vue.js. So I can implement your job perfectly in acc Več

$900 AUD v 12 dneh
(9 ocen)
5.0
Aanaaya

24*7 Support With 100% money back guarantee. Hi sir!, I am Zahoor Ahmed professional Web Developer and 2D/3D Graphics Designer with Animation Experience. Please come in private chat to discuss more in detail about you Več

$250 AUD v 7 dneh
(11 ocen)
4.7
noirmainvincent

Hi, How are you? Thank you for your viewing my proposal. I have read through your project descriptions. As I have over 8 years of web development experiences, I can create high quality result within your time frame. I Več

$250 AUD v 2 dneh
(7 ocen)
4.5
Bilalchoudary

hey. I'm highly interested in your job of making php system that will remove css that is not used ... i have a great experience in web development using html css js and php . i can do this for you.. contact me for fur Več

$250 AUD v 7 dneh
(3 ocen)
2.5
khaledalhindi918

Hi. I have checked your attached document. I am feeling confident about this project. Could we discuss more details in PM? Thanks. Khaled

$500 AUD v 2 dneh
(2 ocen)
1.7
workguruu

Hello Considering its a complete coding work and need more attention so that to be done accurately without disturbing the main design of site. I am a full stack developer. How many pages do you have. And how much time Več

$500 AUD v 15 dneh
(0 ocen)
0.0
kmatsho63

hello there , i clearly understand your issue and i can be helpful if you just want algorithms in php language to make this work done contact me thanks .

$250 AUD v 5 dneh
(0 ocen)
0.0