How to save CSS directly from Chrome developer tools? - css

I work on a local web site project and i use google chrome for testing my css.
So i want to know how can I save the changes I make in chrome css tool to my project, because i have always to copy and paste the css i put to google chrome in my file .css.

Navigate to this stylesheet in the Sources panel of the Developer
Tools, Right-click it, and Save-As this file to your computer
see here for more info

You can use special tools like Emmet LiveStyle http://livestyle.emmet.io/ so that you can edit code in Chrome and it will be automatically saved to your css files (There are more than one of them)

Related

Chrome and Firefox displaying different stylesheets

When I make an edit to the stylesheet of my site, the change appears in Chrome (I load the CSS file in the browser, so I can see the edit is there). When I open the CSS file in Firefox, the edit is not there. I understand browsers will render code differently, but how is it possible that two browsers can open the same CSS file and display two different sets of code?
I tried:
deleting Firefox's cache and restarting the program
deleting the old stylesheet via FTP and uploading an edited one
I checked if the site had a CDN that was perhaps serving the old
file, but the site has no CDN.

Chrome dev tools CSS source mapping doesn't work by default

Myself and my other developers are seeing an issue with Chrome dev tools not recognizing our CSS source maps immediately. Our minified CSS file and .map file are definitely being served and available to the dev tools, but we have to open Settings > Sources > Uncheck and Recheck "Enabled CSS source maps" to get the inspector to reference the actual _partial.scss files for styles. If we don't uncheck and recheck the source maps toggle, it just shows a direct line reference to the minified CSS file, which is not useful.
Has anyone encountered this issue before or know a better workaround for it? This is happening on the latest Chrome version and with several before it.

Realtime css/less/scss edition using chrome DevTools in meteor

I want to raise this question again.
What was suggested in the answer to this question is to use old fashioned approach:
Store css in public folder, and incude it via <link href=
Add public folder to google chrome devtools workspace
Not a rocket science at all. Works, but two things I don't like with this approach:
It's still not native and for production I will have to move files from public folder
Each time you edit css, meteor notices changes and reloads application. Author of that answer ignored it.
Basically this result I want:
I start meteor project, open chrome developer tools
Each time I edit css in chrome developer tools it automatically changes in project.
Problems:
Meteor performs concatenation of all css files even with --debug flag on. But provides source maps.
Meteor will still reload after file changes, but fortunately for styles meteor performs soft injection, I would call it, so page will not really be reloaded. It's okay and not really a problem.
Because of 1st problem and this bug I can not get it work.
This feature is very important for me in terms of productivity.
I would offer a good bounty for some guru, who could give me a direction to solve this. Maybe you point me to some starting points to make a plugin for chrome, this also would be acceptable
The way I do it is pretty simple.
Open your website
Right click -> inspect element
Click on Settings - (the wheel in the top right corner).
3.1. Select General tab and look for Sources label (around the bottom). There search for Enable CSS source maps and Auto-reload generated CSS. Check both. You can check all the features if you want.
Select Workspace tab and add the project folder.
Refresh devtools/browser and repeat everything to step 2.
Now, open the Source panel (Elements - Network - Source). Navigate through your folder and find the css file.
Right click on it and select Map to file system resouce. A window with few css files should appear (depends on your projects config).
7.1 Select the css file for your project. A popup asking you to restart devtools will appear. Click ok. Enjoy.
I haven't tested this with Meteor, but for Harpjs & static HTML files the Chrome LiveReload extension will inject changes in Chrome Dev to the actual file.

Grids not showing

I have a problem in my local pc with some grids in an asp.net website.
The first image is the testing server, and the grids are showing ok here.
The second image is the same page (sabe website, same vs solution) running on my pc(localhost).
What can be missing in my pc??
Thanks!
My initial thought would be to check whether the CSS file you are linking to is accessible in your local environment. Look in the source view of your web browser. You could also pull up IE Developer Tools (F12) and click the CSS tab.

Chrome Dev Tools (CSS) editing and saving

I need to change the color of some words in one category of the widget, I have seen the youtube video about Development Tools.
When I locate the part where I want to change, and I do the change in "Elements" (of Development tools) on the top right corner in the element.style {color:red;
}
but as following the video when I go to resources the changes I made is not there.
I can only edit in Elements, I cant save it
I can only save in Resources, I cant edit/add anything
can someone please help me how this dev tool suppose to work?
I can however edit/add AND save in the Sources, maybe I need to save the style sheet from Resources to Sources? is that what I am suppose to do?
As you said Chrome Dev Tools don't have the builtin function to save the code you edit, anyway there are a couple of Chrome extensions. The best in my opinion is Tincr.
You can find it here Tincr
Then you can also find a tutorial here: http://addyosmani.com/blog/lets-tincr-bi-directional-editing-and-saving-with-the-chrome-devtools/.
Basically you
install the extension,
then you select the application type between: Ruby on Rails, Chrome Extension, Atlassian Plugin and Configuration file,
then you can add the root directory of your project.
When you are done, if you edit something using Google Chrome Dev Tools, the changes will be saved automatically to the source files and there is also a live reload function, so you don't have to press the refresh button or F5 to reload the page after changes.
You cannot edit files on the server through the developer tools and changes will not stay after a refresh.
An updated answer as of March 2013, you can now save changes (JS and CSS, not DOM) from within Dev Tools.
http://remysharp.com/2012/12/21/my-workflow-never-having-to-leave-devtools/

Resources