How do I include a CSS library in my custom module? I want to include the YAMM!3 CSS library in my Drupal 8 site. To that end, I wrote a custom module following the instructions in this answer. Although that answer is in regards to a php library, I thought it would also work for a CSS library. 

This is the composer.json from my custom module:

{
  "name": "drupal/my_yamm3",
  "type": "drupal-module",
  "require": {
    "geedmo/yamm3": "*"
  }
}


In the composer.json in the root of my Drupal codebase, I have this:

"extra": {
    ...
    "merge-plugin": {
        "include": [
            "core/composer.json",
            "modules/custom/my_yamm3/composer.json"
        ],
    ...


I updated my codebase with this commands:

$ composer update
$ composer dumpauto


And I noticed this line in composer's output:

&gt; Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing geedmo/yamm3 (1.1.0): Loading from cache


Which is confirmed by an examination of the filesystem:

$ ls vendor/geedmo/yamm3/
bower.json  composer.json  demo/  gulpfile.js  index.html  LICENSE.txt  package.json  README.md  yamm/


I've enabled the my_yamm3 module on my site, and under admin/config/development/performance, I've disabled css aggregation. 

However, when I load the page, I do not see the yamm libraries being loaded in the network tab in my browser. 

Am I using the correct method to load a third-party css library? What am I doing wrong?

EDIT osman asked for some confirmation of the state of my environment. In my drupal project root, while I do have /composer.json and the directories /drush/ and /vendor/, I don't have /scripts/ nor /web/. I guess that means I am not using the drupal-composer/drupal-project project. 

Regarding his recommended additions to composer.json, this is what I had:

"extra": {
    "installer-paths": {
        "core": ["type:drupal-core"],
        "modules/contrib/{$name}": ["type:drupal-module"],
        "profiles/contrib/{$name}": ["type:drupal-profile"],
        "themes/contrib/{$name}": ["type:drupal-theme"],
        "drush/contrib/{$name}": ["type:drupal-drush"],
        "modules/custom/{$name}": ["type:drupal-custom-module"],
        "themes/custom/{$name}": ["type:drupal-custom-theme"]
    }
},


So again it looks like I don't have the composer project?
Fundamentals

To bind a CSS library into your Drupal installation, it should be defined and exposed via a *.libraries.yaml file.

For example (taken from core's classy theme):

book-navigation:
  version: VERSION
  css:
    component:
      css/components/book-navigation.css: {}


defines that there is a library called book-navigation that when included in a page will deliver the css/components/book-navigation.css css file.

Using composer with 3rd-party CSS libraries 

Composer works easily and reliably for PHP dependencies, using the merge-plugin in the way you started working in the OP. But, CSS and Javascript libraries, especially when some preprocessing or building step is required, are a different story.
This is an open and unsolved (to my knowledge and to the date) problem, you can read this issue to get an idea of what problems arise:


https://www.drupal.org/project/drupal/issues/2873160


The main problem is, that when you import the library as a composer dependency, as you did, the library is installed inside the vendor directory wherever that is located. So, you cannot assume much inside your *libraries.yaml file about the file path to the CSS/JS file(s) you want to use.

Alternative (A) without composer: using CDN / externally hosted libraries definitions

For you case, and taken that you want to include this file:

https://raw.githubusercontent.com/geedmo/yamm3/master/yamm/yamm.css


you could define it inside your *libraries.yaml file as an externally hosted library (see #external):

my_module.yamm3:
  remote:  https://raw.githubusercontent.com/geedmo/yamm3/master/yamm/yamm.css
  version: VERSION
  license:
    name: MIT
    url: https://github.com/geedmo/yamm3/blob/master/LICENSE.txt
    gpl-compatible: true
  css:
    theme:
      https://raw.githubusercontent.com/geedmo/yamm3/master/yamm/yamm.css : { type: external }


N.B.: This approach should always deliver the latest yamm.css version.

Alternative (B) without composer: keeping a local copy in your own module's folder

If you place the CSS file inside your module's folder, e.g. css/yamm.css, you will be able to use the following yaml definition in your *.libraries.yaml file in order to be able to use it:

my_module.yamm3:
  version: VERSION
  css:
    theme:
      css/yamm.css : {}


Attaching a library to page(s)

Finally, after you are done defining your library, you can start using it.

This is documented extensively here (https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module) and I would recommend reading that if you haven't already.

Good luck!