By drupalhero |
Drupal8 W3CSS Theme - Card Classes

How to attach your style?1- The One For All method The One For All method includes all your styles in a single master style sheet. With this method, creating well-organized and readable style sheets with a TOC is critical because you may be poring through hundreds or even thousands of lines of code.
Pros—One download is faster than multiple downloads, and the file is then cached for use on other pages. In addition, with all of your code in one place, you don’t have to worry about whether a page has access to the right styles.
Cons—This method may lead to large file sizes that can slow down the page loading time and take longer to render. Additionally, these files are harder to manage and edit.
2- The Divide and Conquer method The Divide and Conquer method uses multiple links to multiple style sheets on an as-needed basis per page. Start with a link to a file with global styles used by all pages, and then add links to styles used for that page only.  For example, if you use a special carousel module only on the main page, it would not go into the global file, but would exist as a separate CSS file for the home page or as part of a CSS file of general components.
Pros—Mix and match style sheets from your library to load only the styles you need and reduce bloated file sizes. Plus, as long as you keep your files organized, these are generally easier to edit.
Cons—Multiple files mean multiple server calls, which slows downloads. Plus, multiple files can be hard to keep up with, and their cascade order can conflict in unpredictable ways.
3- The Aggregate method The Aggregate method uses @import to collect all the relevant CSS files from your library. The HTML document then has to link to only a single external file.
Pros—Similar to the Divide and Conquer method, but by using only a single link, it’s easier to add or remove styles as needed because they are in a single CSS file rather than spread out across multiple HTML files.
Cons—Similar to the Divide and Conquer method but worse. This used to be a very popular CSS strategy until someone discovered that using @import often prevents external style sheets from loading simultaneously. Instead, they must load one after another, which slows things down. Additionally, since the linked parent style sheet has to load before the imported style sheets are seen by the browser, this method can lead to the page rerendering as new styles become available.
4- The Dynamic method The Dynamic method relies not on your skills as a CSS coder, but on your skills writing server-side code. It is possible to write server scripts that take an aggregated CSS file full of @imports and combine them on the server into a single file for deployment.
Pros—Combines the ease of use and lean file size of the Aggregate method with the speed of the One For All method.
Cons—Requires knowledge of server-side coding that is beyond the scope of this book. Talk to your server admin or developer for more details.

Card Classes
Class Defines
w3-card Same as w3-card-2
w3-card-2 Container for any HTML content (2px bordered shadow)
w3-card-4 Container for any HTML content (4px bordered shadow)
w3-card-8 Deprecated (Use another card class instead)
w3-card-12 Deprecated (Use another card class instead)
w3-card-16 Deprecated (Use another card class instead)
w3-card-24 Deprecated (Use another card class instead)