Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Copying the source from <a href="https://stackoverflow.com/questions/1004475/jquery-css-plugin-that-returns-computed-style-of-element-to-pseudo-clone-that-ele">SO1004475 - jQuery CSS plugin that returns computed style of element to pseudo clone that element?</a> - Please follow link and upvote there if you find it useful.</p> <p>It seems ridiculous, but this is probably your best option - makes <code>.css()</code> with no arguments get an object with all this stuff set.</p> <pre><code>jQuery.fn.css = (function(css2) { return function() { if (arguments.length) { return css2.apply(this, arguments); } var attr = ['font-family','font-size','font-weight','font-style','color', 'text-transform','text-decoration','letter-spacing','word-spacing', 'line-height','text-align','vertical-align','direction','background-color', 'background-image','background-repeat','background-position', 'background-attachment','opacity','width','height','top','right','bottom', 'left','margin-top','margin-right','margin-bottom','margin-left', 'padding-top','padding-right','padding-bottom','padding-left', 'border-top-width','border-right-width','border-bottom-width', 'border-left-width','border-top-color','border-right-color', 'border-bottom-color','border-left-color','border-top-style', 'border-right-style','border-bottom-style','border-left-style','position', 'display','visibility','z-index','overflow-x','overflow-y','white-space', 'clip','float','clear','cursor','list-style-image','list-style-position', 'list-style-type','marker-offset']; var len = attr.length, obj = {}; for (var i = 0; i &lt; len; i++) { obj[attr[i]] = css2.call(this, attr[i]); } return obj; }; })(jQuery.fn.css); </code></pre> <p>Note that this doesn't capture all possible CSS properties, particularly new ones for CSS3. Here is a <a href="https://developer.mozilla.org/en-US/docs/CSS/CSS_Reference" rel="nofollow noreferrer">list of all standard CSS and stable CSS3 properties</a>, and here's one of <a href="http://peter.sh/experiments/vendor-prefixed-css-property-overview/" rel="nofollow noreferrer">hyphen-prefixed vendor-specific properties</a> (such as <code>-moz-border-start</code>). If you really want all of them, you can glean them from there.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload