Cognos Analytics

 View Only

Custom CSS in Link Widget

  • 1.  Custom CSS in Link Widget

    Posted 28 days ago

    Does anyone know how I can adapt the following CSS so that it works with the Link Widget in dashboards. I can get basic stuff to work like colour, background etc but I dont see how to structure the hover effects etc so that cognos understands it. Any inights would be great.

    <!-- HTML !-->
    <button class="button-71" role="button">Button 71</button>

    /* CSS */
    .button-71 {
      background-color: #0078d0;
      border: 0;
      border-radius: 56px;
      color: #fff;
      cursor: pointer;
      display: inline-block;
      font-family: system-ui,-apple-system,system-ui,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",sans-serif;
      font-size: 18px;
      font-weight: 600;
      outline: 0;
      padding: 16px 21px;
      position: relative;
      text-align: center;
      text-decoration: none;
      transition: all .3s;
      user-select: none;
      -webkit-user-select: none;
      touch-action: manipulation;
    }

    .button-71:before {
      background-color: initial;
      background-image: linear-gradient(#fff 0, rgba(255, 255, 255, 0) 100%);
      border-radius: 125px;
      content: "";
      height: 50%;
      left: 4%;
      opacity: .5;
      position: absolute;
      top: 0;
      transition: all .3s;
      width: 92%;
    }

    .button-71:hover {
      box-shadow: rgba(255, 255, 255, .2) 0 3px 15px inset, rgba(0, 0, 0, .1) 0 3px 5px, rgba(0, 0, 0, .1) 0 10px 13px;
      transform: scale(1.05);
    }

    @media (min-width: 768px) {
      .button-71 {
        padding: 16px 48px;
      }
    }



    ------------------------------
    Eric Mueller
    ------------------------------