GithubHelp home page GithubHelp logo

hojberg / cssarrowplease Goto Github PK

View Code? Open in Web Editor NEW
2.2K 2.2K 367.0 707 KB

Generate CSS tooltip arrows

Home Page: http://cssarrowplease.com

License: MIT License

JavaScript 75.35% CSS 12.87% HTML 11.78%
css css-arrow javascript tooltip-arrow

cssarrowplease's Introduction

cssarrowplease's People

Contributors

ackl avatar barnabyc avatar etiennelem avatar fental avatar hojberg avatar mattyclarkson avatar mems avatar munter avatar rafbm avatar ryanmcdermott avatar stha avatar yannickcr avatar yukulele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cssarrowplease's Issues

Arrow becomes bigger then container

Arrow becomes bigger then container and protrudes out the sides after certain size.

(i.e. when pointing to the left, the other two corner of arrow starts showing after 150px.)

Pointer-events?

What's the deal with pointer-events: none on the pseudo elements? Wouldn't that only cause suppporting browsers to ignore all pointer events coming in on top of the arrow? In practise, wouldn't that prevent the user from being able to scroll or pinch using the fingers when that gesture starts on top of the arrow?

Or is there a good reason to have this rule?
...In which case, -ms-pointer-events should be added.

Feature Request: rgba as background colour in option.

Would love to see this! Solid colours are nice but would be great to have the arrows being able to be transparent.

ie in this use case:

image

Also I am not quite sure what the purpose of the changing border-colour values if their opacity is 0.

image

Feature Request: Background Images And Indented Triangles

Is it possible to add this to the demo? I'd like to have either divs with a background image and the arrow out at the botto, if possible. OR, it could be helpful to see a box with a triangle cut out of it at the top. Just a couple of things I've wanted in the past, thanks for making the cool app.

CSS3 drop-shadow filter auto-magically includes pseudo elements

box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); becomes filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));

The glorious arrow now casts a shadow!

Screen Shot 2012-12-23 at 12 28 24 AM

Support is webkit only at this point, but I think that a little progressive enhancement couldn't hurt, either way I think it's a technique that is relevant to the interests of those using this tool.

Why CSS3

Hi. Thanks for the code, looks good. I just wondered though, why would you use CSS3 for this? If you added a HTML DIV for before and after, then you dont need to use CSS3, therefore this would work in IE8 and below.. at the moment it doesn't. So with some simple changes you can make it work.

If you want it to work with IE8

Just add a fallback that uses background-color: transparent instead of rgba.

/* Fallback for IE8- which doesn't understand rgba */
border: 20px solid transparent;
/* Feed rgba to other browsers (FF PC needs it to avoid a bug) */
border: 20px solid rgba(255,255,255,0);

expires headers in /static

The built files in /static are named after the md5 hash of their contents. This means you can change your cache strategy for those files to add a far future expires and let the browser cache heavily.

Pseudo-elements should use double colon syntax (:: instead of :)

:after and :before are relics left over from their CSS2 implementation. In the CSS3 module, these are defined as ::after and ::before. The only reason browsers still support the single-colon syntax is to prevent the CSS2 syntax from not functioning as intended.

Drop Shadow

Hi

How can you add a drop shadow to the border including the tip?

Thanks

Sizes in ems

In stead of pixels, I prefer setting sizes of elements in ems whereever possible. It makes sense for font-zooming, which would also cause the arrow to become bigger, which may be very sensible depending on the use-case.

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.