Retrieve the font-size form page - css

I'd like to make sure the font-size of edit button of stackoverflow's question:
I checked it in development tool of chrome, but get
font-size:100%
font-size;inherit,
and some deleted style
How could I check it in a straightforward way?

Look in the tab "computed". There you find everything (including browser styles) in absolute units.

Related

How to overwrite CSS in Google homepage with Chrome?

I would like to overwrite CSS style in Google homepage.
I'm able to do it with DevTools/Overrides but DevTools has to be always open.
I checked some Chrome extensions and they work everywhere but not in this default tab (without url).
There is an option in the right bottom corner to change the background but no way to define the entire CSS style.
I remember something like this was possible, any CSS to any website on FF and Chrome, maybe they remove it.
Is there any way to change the CSS and make it permanent?
Any help will be really appreciate : )
DevTools only makes client-side changes (changes that only you and your device can see). These changes do not affect the css that is sent to you over the internet. However, the changes you make in DevTools are erased every time the page is reloaded, and the default code from the server is restored. As a result, you can’t make permanent css changes to code from a server that you do not own; all client-side changes are temporary.

how do I save changes made in Firefox Developement Edition

As I am trying to figure out the 'CSS Grid', I stumbled over Firefox Developement Edition. By the way, a great tool for learning CSS Grid. It would be even nicer if I could use the editor to actually change stuff. Unfortunately, I do not know how to save the changes I made (img).
help is much appreciated.
Your screenshot shows the Inspector-View of the dev tools. You can save files to you local disc with in the Style-Editor-View. There is a little save-button for each style-file.
However you also can mark style properties with the mouse and copy and paste them anywhere.
In modern Firefox, there is a new feature for this!
In the inspector, in the right pane, the fourth tab should be Changes.
It contains a button to Copy All Changes you made to the clipboard as a stylesheet.
You can then use the extension Stylish, create a new style in there, paste those styles into the text box, add a URL patten for which it should apply via the buttons below, give it a name, save the thing, and you’re set.
One caveat: If you disabled CSS rules on that page, they will appear as comments and do nothing. So you need to uncomment them, and set their value to something like none or initial or unset.
E.g. to force those brain-dead sites that are designed for tablets only to use the full width of your screen, you’d disable max-width, which would appear as /* max-width: 80rem; */ or something in your styles. So you’d turn that into max-width: none;.

Copying all css attributes of a class/id via chrome inspect

Is there a way to quickly copy all of the css code of the inspected element in google chrome?
I found that while designing, it's sometimes easier to change the css on-the-fly via inspect to figure out correct pixel distances, rather than changing in the code and refreshing the page.
Does that capability even exists?
thanks to steveax's comment I was able to find the answer, which I will share with you
Once the inspected element has been edited, going to the sources tab and choosing the appropriate CSS where that element is defined, the edited attributes will appear there, which you can copy regularly..
Obviously, a copy straight from the style window would be more comfortable..

Is there a browser extension to get all the CSS that is applied to a DOM element?

Firebug is great, and allows me to see all the CSS applied to an element in the DOM that you select, but either you can:
a) View it line by line, as defined in the CSS, in the applied order (very useful but not what I'm looking for) or
b) View it "computed", which is all CSS rules and the values that this element has.
What I want is a tool or extension that allows me to select an element and would show me, in copy-pastable form, all the CSS that's been defined for that element. If the element has font-style:normal just because it's the default for that element, I don't want that there (Firebug shows all this in computed view).
Basically I want to be able to:
I see an element I'd like to replicate on a website (like a button) exactly in my own website.
Use this tool to get a bunch of CSS applied to that element.
Paste on my own CSS.
Get the same looking element in my website. Yay!
Any ideas?
Switch to Chrome default element inspector (press F12), it has all that you need. You'll find everything in the Computed Style panel, including a useful "Show inherited" checkbox
I know the question is almost 4 years old, but if there is someone looking for it today, there's a Chrome extension that handles it. https://github.com/kdzwinel/SnappySnippet
It adds a new tab in Chrome Inspector and you just need to click a button to get all html and css of the selected element and its children. Then you can export it to codepen, jsfiddle and jsbin, or copy and paste.
Google Chrome has tools like Firebug built in called "Chrome Developer Tools". It is extremely powerful from my experience and I switched from Firefox/Firebug to Chrome about a year ago. There are several different ways to get the developer tools up. You can find detailed documentation at https://developers.google.com/chrome-developer-tools/docs/overview
When you have the Chrome developer tools open to the elements tab with an element selected, you can expand the computed styles area on the right and see all styles that make up that element.
If the specific style has an expandable triangle to its left, you can find out what stylesheet and where the styling comes from.
You don't need any extensions for that, the built-in inspector in Firefox can do that. Right-click the element, choose "Inspect Element". Click the Style button in the bottom toolbar - and there it is, a sidebar with all the styles applied to that element.
I have tried to calculate it via window.getComputedStyle and it is needed to be optimized to shake out unnecessary style properties. https://github.com/aleen42/DOM-mirror
I've tried SnappySnippet and found CSSSteal to be much better. It will grab just the CSS, and will do so in the same format as the document has it, unlike SnappySnippet.
There's an API on window Object >> window.getComputedStyle(DOMElement). This is if we need to work with computed styles programmatically.
MDN Docs for window.getComputedStyle
Good Luck...
You can try this extension https://getcssscan.com/?ref=beautifulcheckboxes_header but it is not free. I found this while I was finding a solution.

Site-specific: Firefox vs. IE CSS peculiarities

I'm trying to learn CSS. I've taken great pains to get everything right. My pages all validate and they look correct on Firefox and mostly correct on Chrome. However IE is all over the place. In relation to Firefox, the following is wrong in IE (in order of importance):
the main body box is pushed below where the left boxes end
the upper-right drop-down stuff (mouse over "Settings") is totally off in the weeds (it's off in Chrome also but in a different way)
"Recipes" tab is supposed to have no visible bottom border
search button is askew in relation to search box
logged out version: the upper-right login elements are askew
Logged in,
Logged out,
CSS,
Links, functionality, etc. are not guaranteed to work on these pages. It's just static snapshots to show layout.
Can anyone point me in the right direction for whatever I'm doing wrong?
You need to Reset your CSS (Dean, above recommends Eric Meyer's Reset CSS). I prefer Yui Reset CSS (I actually like their own Reset / Fonts / Grids CSS). As part of doing this you also need to use Standards Mode.
Finally, you need to be aware that some things will differ in browsers no matter what. So if you run into this situation, it's either work around it, or live with it.
What version of IE are you running? Sounds like most of your issues may be caused by the IE Box Model Bug.
I never start a new website design in css without putting Eric Meyer's Reset CSS in first.
It resets all the differences in all the browsers, so that you've got a even playing field to start from.
From there-out, everything should be the same in all browsers.

Resources