UPDATE: As @tank answers below, Chrome version 77 added "Copy Styles" when you right-click on an element in the devtools inspector.
Using Javascript worked best for me. Here's how I did it:
Paste this function from this stack overflow answer into the console, and hit dumpCSSText:Enter
function dumpCSSText(element){
var s = '';
var o = getComputedStyle(element);
for(var i = 0; i < o.length; i++){
s+=o[i] + ':' + o.getPropertyValue(o[i])+';';
}
return s;
}
When using Chrome, you can inspect an element and access it in the console with the variable. Chrome also has a $0 command, so use this command to copy ALL the css of the inspected element:copy
copy(dumpCSSText($0));
Paste your CSS wherever you like!
For chrome you can use Quick Source Viewer to see all CSS, whether in the or the body, whether in the served HTML or injected at runtime.head
It is better than the dev tools as you don't have to go looking for the tags, and saving them is just a right click on the link.style
I just found the answer to my question on this post Inspect webkit-input-placeholder with developer tools
What I need to do is to enable 'Show user agent shadow DOM' in the Settings panel of Chrome Developer Tools. Now the properties are visible.