HISE Logo Forum
    • Categories
    • Register
    • Login

    Can we draw Path in CSS ?

    Scheduled Pinned Locked Moved General Questions
    cssscriptingstylesvgicon
    4 Posts 3 Posters 215 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • oskarshO
      oskarsh
      last edited by

      I have the feeling I've seen it somewhere. But.

      Is it possible to draw a svg or path in the new CSS renderer?

      Christoph HartC 1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart @oskarsh
        last edited by

        @oskarsh yes, store it as a base64 string and then use it as background-image property. This is demonstrated here:

        Link Preview Image
        HISE | UI Components | Slider

        The knob / slider element can be used to set values with dragging.

        favicon

        (docs.hise.dev)

        (scroll down to the next code example).

        You can of course hardcode the base64 path directly into CSS if it's not dynamic so for static icons I would prefer this.

        1 Reply Last reply Reply Quote 1
        • T
          tonni
          last edited by tonni

          @oskarsh said in Can we draw Path in CSS ?:

          I have the feeling I've seen it somewhere. But.

          Is it possible to draw a svg or path in the new CSS renderer?

          Yes, it’s definitely possible to work with SVG or paths in the new CSS renderer, but it really depends on what you’re trying to do. If you're using SVG elements directly in your HTML, you can still style them with CSS like before. But if you're trying to create shapes using only CSS, with things like clip-path or mask, the newer CSS features give you more control than they used to. It’s not the same as drawing a full SVG, but for simple shapes and visual effects, it can get the job done. If you're working on something more advanced, getting help from a mobile app development company might also be a good idea. Let us know more about your goal so we can guide you better.

          Christoph HartC 1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart @tonni
            last edited by

            Let us know more about what you’re trying to achieve and we can give better advice.

            Damn, bots are getting better but this gave it away.

            1 Reply Last reply Reply Quote 3
            • First post
              Last post

            35

            Online

            1.8k

            Users

            12.1k

            Topics

            105.2k

            Posts