PHP Used CSS Generator

Cerrado Publicado hace 3 años Pagado a la entrega
Cerrado Pagado a la entrega

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

Nº del proyecto: #26116543

Sobre el proyecto

19 propuestas Proyecto remoto Activo hace 3 años

19 freelancers están ofertando un promedio de $450 por este trabajo

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 Más

$250 AUD en 1 día
(421 comentarios)
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 en 12 días
(239 comentarios)
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 Más

$500 AUD en 7 días
(34 comentarios)
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 en 7 días
(29 comentarios)
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 ​ Más

$300 AUD en 7 días
(20 comentarios)
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 Más

$300 AUD en 4 días
(25 comentarios)
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 en 5 días
(19 comentarios)
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 en 7 días
(44 comentarios)
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 Más

$900 AUD en 12 días
(9 comentarios)
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 Más

$250 AUD en 7 días
(11 comentarios)
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 Más

$250 AUD en 2 días
(7 comentarios)
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 Más

$250 AUD en 7 días
(3 comentarios)
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 en 2 días
(2 comentarios)
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 Más

$500 AUD en 15 días
(0 comentarios)
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 en 5 días
(0 comentarios)
0.0