Giter Site home page Giter Site logo

Buttons: Add arrows about scripted HOT 3 CLOSED

savannahjulian avatar savannahjulian commented on August 15, 2024
Buttons: Add arrows

from scripted.

Comments (3)

AugustMiller avatar AugustMiller commented on August 15, 2024

You're looking to include a small Feather-icon inside some buttons?

This could be a javascript solution that appends a span tag to all buttons with an "arrow" class, rather than going back in and attempting to shim the code on ourselves.

from scripted.

savannahjulian avatar savannahjulian commented on August 15, 2024

Yeah I just wanted to make a note of it because I wasn't sure how to add some "html safe" content in tags for the buttons since they were being populated by wordpress…does that make sense?

from scripted.

AugustMiller avatar AugustMiller commented on August 15, 2024

Any .php file in this project is going to output raw HTML ultimately, so you're welcome to add a span element wherever you like, and it'll appear as you'd expect. It's just a matter of maintenance, i.e:

Option 1

Use a class or data-attribute to find and append span tag with JavaScript

  • "DRY" programming: we only write the HTML once, and it gets recycled every time a button needs an arrow
  • Code in the PHP/HTML could be as minimal as <button class="blue arrow">Button Text</button>

Option 2

Add span inline

  • Additional maintenance on each button requiring an arrow: <button class="blue">Button Text<span class="icon-arrow-right"></span></button>

from scripted.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.