<section id="bold_turquoise_bear-3">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 100">
        <defs>
            <clipPath id="clip-1">
                <rect class="clip-1-rect" x="10" y="10" width="80" height="80" />
            </clipPath>

            <clipPath id="clip-2">
                <rect class="clip-2-rect" x="110" y="10" width="80" height="80" />
            </clipPath>

            <clipPath id="clip-3">
                <rect class="clip-3-rect" x="210" y="10" width="80" height="80" />
            </clipPath>
        </defs>

        <rect class="bg-rect" x="10" y="10" width="80" height="80" />
        <rect class="bg-rect" x="110" y="10" width="80" height="80" />
        <rect class="bg-rect" x="210" y="10" width="80" height="80" />

        <image clip-path="url(#clip-1)" href="/img/6404964189_8d2c7688c5_k.jpg" preserveAspectRatio="xMidYMid slice" x="0" y="0" width="300" height="100"></image>
        <image clip-path="url(#clip-2)" href="/img/22534825249_79ee4841af_k.jpg" preserveAspectRatio="xMidYMid slice" x="0" y="0" width="300" height="100"></image>
        <image clip-path="url(#clip-3)" href="/img/32242741015_6accbb5d52_k.jpg" preserveAspectRatio="xMidYMid slice" x="0" y="0" width="300" height="100"></image>
    </svg>
</section>

<script src="../../js/components/bold_turquoise_bear-3.js"></script>
<section id="bold_turquoise_bear-3">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 100">
        <defs>
            <clipPath id="clip-1">
                <rect class="clip-1-rect" x="10" y="10" width="80" height="80"/>
            </clipPath>

            <clipPath id="clip-2">
                <rect class="clip-2-rect" x="110" y="10" width="80" height="80"/>
            </clipPath>

            <clipPath id="clip-3">
                <rect class="clip-3-rect" x="210" y="10" width="80" height="80"/>
            </clipPath>
        </defs>

        <rect class="bg-rect" x="10" y="10" width="80" height="80"/>
        <rect class="bg-rect" x="110" y="10" width="80" height="80"/>
        <rect class="bg-rect" x="210" y="10" width="80" height="80"/>

        <image clip-path="url(#clip-1)" href="/img/6404964189_8d2c7688c5_k.jpg" preserveAspectRatio="xMidYMid slice" x="0" y="0" width="300" height="100"></image>
        <image clip-path="url(#clip-2)" href="/img/22534825249_79ee4841af_k.jpg" preserveAspectRatio="xMidYMid slice" x="0" y="0" width="300" height="100"></image>
        <image clip-path="url(#clip-3)" href="/img/32242741015_6accbb5d52_k.jpg" preserveAspectRatio="xMidYMid slice" x="0" y="0" width="300" height="100"></image>
    </svg>
</section>

<script src="{{ path '/js/components/bold_turquoise_bear-3.js' }}"></script>
/* No context defined. */
  • Content:
    (function () {
      document.addEventListener('DOMContentLoaded', function () {
        console.log("bold_turquoise_bear-3 active");
    
      });
    })();
    
  • URL: /components/raw/bold_turquoise_bear-3/bold_turquoise_bear-3.js
  • Filesystem Path: components/01-metal/04-working-with-clip-paths/03-bold_turquoise_bear-3/bold_turquoise_bear-3.js
  • Size: 139 Bytes
  • Content:
    #bold_turquoise_bear-3 {
      padding: 1rem;
    
      svg {
        border: 1px solid teal;
    
        .bg-rect {
          fill: coral;
        }
    
        // So the transform origin is the center of the clip path as it's absolutely
        // placed by the svg code...
    
        .clip-1-rect {
          transform: scale(0.95, 0.05);
          transform-origin: 50px 50px;
        }
    
        .clip-2-rect {
          transform: scale(0.15, 0.75);
          transform-origin: 150px 50px;
        }
    
        .clip-3-rect {
          transform: scale(0.5, 0.5);
          transform-origin: 250px 50px;
        }
      }
    }
    
  • URL: /components/raw/bold_turquoise_bear-3/bold_turquoise_bear-3.scss
  • Filesystem Path: components/01-metal/04-working-with-clip-paths/03-bold_turquoise_bear-3/bold_turquoise_bear-3.scss
  • Size: 532 Bytes
  • Handle: @bold_turquoise_bear-3
  • Preview:
  • Filesystem Path: components/01-metal/04-working-with-clip-paths/03-bold_turquoise_bear-3/bold_turquoise_bear-3.hbs

No notes defined.