Is it possible to implement a full css page into google dev tools? [duplicate] - css

This question already has answers here:
Inject CSS with chrome developer tool?
(9 answers)
Closed 5 years ago.
I have a project where I'm writing new CSS for a client's website, but I have no actual access to their code. To get around this, I've been editing the CSS in browser element by element using google dev tools. The big problem with this method is that once I've written all this new CSS, if the browser is refreshed I lose all of it.
Question is, does google dev tools have a feature where I can upload a whole new CSS document to override what it's displaying in browser?
I'm going to guess no, but if it was possible it would make my life a lot easier moving forward. Thank you all.

You could inject a script using JavaScript. You could have the code run automatically with a something like TamperMonkey. GreaseMonkey for FireFox is similar and will give you many more examples. You could also use the script to remove any stylesheets on the page right before you inject the reference to yours.

Related

Is there a difference between custom.css and other css files? [duplicate]

This question already has answers here:
css best practices - combining all css into a single stylesheet?
(4 answers)
Closed 8 years ago.
Are there any notable differences between placing all my CSS into custom.css, and dividing it up by controller (For example, putting all user-related CSS into user.css, etc)?
Dividing it up is more organized, but one concern I have is that if I have to write '#import "bootstrap";' at the top of every css file, my app might load bootstrap seperately for every file, thereby possibly increasing the load time.
Any input would be appreciated!
Adding css in different files is, as you said, purely for organizational purposes. It has no functionality differences.
However, when you refer to the #import bootstrap implementation, i would suggest against adding that in every css file, for the reason you stated above (because you can miss something or you can link it twice). If you simply add a reference link at the top of your template html page (if you are using one) or at the top of your html pages (if you are not using one), it ensures that bootstrap is loaded once per page (or once per session if its a single page application) so you wont have to worry about missing bootstrap or loading it multiple times unnecessarily.
hope this helps!
I think it is a matter of personal preference. the more you have code, the more difficulty you will have when debugging or going through the file. For me, I usually store them under the root folder in a Css folder. and I also like breaking them down and not mixing my bootstrap files with my custom cssbut that's just me.
I also split it using specific values like for example if i have a css for a specific browser, i put it in the folder a folder like css/firefox/overrider.css
I think it is just a matter of preference. for the import, individual csswill be better (correct me if I am wrong). It is better explained here: Import vs Link files

How to style a 3rd-party iFrame [duplicate]

This question already has answers here:
How to apply CSS to iframe?
(28 answers)
Closed 9 years ago.
Is there a way to CSS-style a 3rd party iframe? For example, with a Twitter widget, I would like to change the font size.
How would I do this?
I don't think you do... For all intents and purposes that iframe is another document and is completely outside of your control (as long as it's 3rd party and / or stored in another domain).
In the case of twitter you can always configure the widget itself when you start it but as long as you're trying to access / alter most properties of the document inside the iframe, you're sold.
Long story short: as far as I know you're dependant on whatever tools the 3rd party provides you. Of course, you can always do hacks (intensive curl calls, parsing and rewriting) but that would be like killing a fly with a really big cannon.
What are you exactly trying to achieve?. Maybe there's a way the 3rd party allows you to...

create custom loading page in flex web application [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Custom Preloader in Flex 4?
I am working with a flex web application and i want to implement custom loading page on application startup like the above http://www.picnik.com/app and i am using Flex3.5 sdk.
How can i achieve that. Any code and link would be appreciated.
There are lots of examples out there, but the best ive come accross are the following - had these saved in my gmail account for ages:)
This is the best one ive seen
http://blogagic.com/14/the-blogagic-custom-flex-preloader
Adding an image to the background of the preloader
http://polygeek.com/flex/2742_preloaderBackgroundImage/srcview/index.html

Find unused css [duplicate]

This question already has answers here:
How to identify unused CSS definitions from multiple CSS files in a project
(3 answers)
Closed 1 year ago.
I'm doing some development for some pages on our internal network. I want to know if there's an open source tool or FF plugin which can identify unused css within a project.
I've looked at using this, but when I try to install the Add-on Installer says "Not compatible with Firefox 3.6"
https://addons.mozilla.org/en-US/firefox/addon/dust-me-selectors/
Please note, this is for an intranet - not a www visible website - so I can't use the online sites which offer such services.
Google Chrome (and therefore probably Safari as well) have the developer tools installed, which come with Audits. When you audit the page, the unused CSS rules is one thing it checks.
Here's what it looks like on this page.
I've been looking for a while, and the best thing I found was this:
http://unused-css.com/
They scan your site and email you the result css.
I am aware you are working on a localsite, however if you find no alternative, you can upload your site somewhere and use this
Alternatively
You could install a previous version of firefox that is compatible with dust-me selectors and run it along side your current installation of firefox.
I have CSS Usage installed in FF. But barely used it once. It searches for un-used CSS on the current page, not the whole project though.
dust-me-selectors Firefox addon is now compatible with Firefox 16...
Is it possible to combine all of your HTML pages together into one single page, for example using:
type *.htm > all-pages.htm
Then you could run Firefox/CSS Usage on this single, 'super' page?
There is a new program at sourceforge called CSS Scanner, it scans for used and unused css classes and stylesheets in html, aspx, php, javascript and jquery code.
It's .net code so you'll need Windows:
http://sourceforge.net/projects/cssscanner/
Chrome addon, which generate stylesheet of css rules effectively used in a page, can be tried for the quick results..here is the link
https://chrome.google.com/webstore/detail/css-remove-and-combine/cdfmaaeapjmacolkojefhfollmphonoh
It also gives summary about the rules, which are not been used.
And this one involves grunt and related plugins to find unused code
http://addyosmani.com/blog/removing-unused-css/
If you are familiar with node js you can also use "find unused css": https://www.npmjs.com/package/find-unused-css

mediawiki common css [duplicate]

This question already has answers here:
Where is monobook.js stored in MediaWiki?
(2 answers)
Closed 7 years ago.
I installed Mediawiki on our web server and at the moment the design is lacking a bit. I am not satisfied with the layout of my tables. In short they are ugly.
I took a look a wikipedia tables and they are using the class="wikitable" in the table declaration. After some research I found the page http://www.mediawiki.org/wiki/MediaWiki:Common.css were code is provided to improve the layout. You have to create a new page in your wiki installation and add the provided CSS-Code and save it. After reloading and emptying the Cache of your browser (SHIFT + Reload-Button for FF) you should be able to use class="wikitable" in your table definitions. It is not working for me. Does anyone know what I missed?
regards, Usurper
Look at the HTML source of your wiki
pages to see if these pages are loaded
at all (note that Common.js is called
from
?title=-&action=raw&smaxage=0&gen=js
"site js" URL. If they are called,
check the content inside.
http://www.mediawiki.org/wiki/MediaWiki_talk:Common.css#Common.css_does_not_seem_to_have_any_impact

Resources