Code Monkey home page Code Monkey logo

css-modal's Introduction

Hello hello, my name is Hans 👋

As an experienced Engineering Leader and Software Architect, I currently serve as the Vice President of Engineering for Seven.One Entertainment Group (ProSiebenSat.1).

I have been utilizing Agile development and methodologies for over a decade and have 13 years of professional experience developing scalable web-applications using cutting-edge technologies. I am passionate about creating robust systems in high-performance environments and building teams that strive for excellence. My primary focus is on empowering and accelerating the growth of my team members.

Get in Contact

Website Twitter LinkedIn

css-modal's People

Contributors

4nduril avatar adriaanbaelus avatar anselm-urban avatar anselmh avatar ben-m avatar benschwarz avatar bitdeli-chef avatar drublic avatar fabien-d avatar grayghostvisuals avatar jgadbois avatar kittygiraudel avatar kkirsche avatar melros avatar michaelthorne avatar noordawod avatar ppowalowski avatar realmyst avatar schepp avatar sylvaincombes avatar tzi avatar xhmikosr 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

css-modal's Issues

How to open modal on page load?

Is there a way to open the model on page load instead of by clicking a link?

(this isn't an "issue" but I'm not sure how to post a question, sorry if I broke protocol)

Suggested IE8 Adjustments

Since the modal reverts to a cropped window with a scrollbar in IE8, I suggest doing the following:

// Content Area
.modal-inner {
    .lt-ie9 & {
        background: transparent;
        height: 100%;
    }
}

.modal-content {
    .lt-ie9 & {
        overflow: visible;
    }
}

This looks a bit cleaner by removing the cropped window and scrollbar. Also another suggestion would be to increase the transparency for the base64 data URI with the IE8 overlay. Gives a bit more contrast for the content.

A bit of a bummer with the IE class names as it assumes you have conditional tags around the HTML tag.

Oh and here is the new data URI for the IE8 overlay. 90% alpha channel.

background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAFo9M/3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkQ1MjlFRTc5MEVBMzExRTM4RTJGOUYxNjgwODA3RDA3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkQ1MjlFRTdBMEVBMzExRTM4RTJGOUYxNjgwODA3RDA3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RDUyOUVFNzcwRUEzMTFFMzhFMkY5RjE2ODA4MDdEMDciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RDUyOUVFNzgwRUEzMTFFMzhFMkY5RjE2ODA4MDdEMDciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz69n3R4AAAARUlEQVR42mJkYGB4BsQMTAxQABBAjBgiAAEEF4EBJgY0ABBAhFUQFgAIIAwzCOqgvgKAABoMbhgMCgACjGA4jBowIgwAAOMoDMMrMcsSAAAAAElFTkSuQmCC);

Modal doesn´t show up in IE 10

The modal on my website doesn´t show up in IE10!

Here´s my code:

<a href="#twitter" class="topButton call-modal" title="Show my Twitter feed"><span class="icon-twitter"></span></a>
<figure class="semantic-content" id="twitter" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-inner">
        <div class="modal-content"><a class="twitter-timeline" height="500" href="https://twitter.com/anselm_urban" data-widget-id="280297923747647489">@anselm_urban´s tweets</a></div>
    </div>
    <a href="#!" class="modal-close" data-dismiss="modal">×</a>
</figure>

Update: works with JS.

ESC-Key prevents image loading in IE(9)

The ESC-Key method (JS) to close a modal prevents loading other modal images in IE9. Means you call one modal with an image included, close this via ESC-Key. Then open another one with an image inside and the image is not loaded anymore.
Maybe it needs preventDefault?

z-index values as variables

Do z-index values as variable which can be set by user. This gives an easy possibility to users of the modal to set the z-index properly and not always set it to the maximum values.

Opera modal close

In Opera the modal close button is active also when modal is not opened. This leads to serious page navigation problems in some cases as the whole content outside of .modal-inner is triggered for modal-close.

Page jumps to top

When you click on one of the examples on the demo page the page jumps to the top.
That's not optimal since you have to scroll back down, once you dismiss the modal.

Update for website

The website is now in gh-pages exclusively.
We need to update and represent the latest changes of the repo in a good way. One big feature is stackable modal. Also the LESS branch needs some attention.

Android 2.3: Scrolling in modal fails

Scrolling in modals is not working on Android 2.3. The same issue appears on iOS 4.2 (which isn't really a problem at the moment). Maybe it is possible to work around this issue using JavaScript.

inner scrolling buggy on Firefox

inner scrolling of images (image higher than modal container) is buggy: When scrolling down in Firefox (stable, v17) the image turns black. Scrolling up it shows up again.

Can show you a video if needed.

Is it possible to show modal on page load?

I would love to use this modal on my site, but I need it to load on page load instead of when someone clicks a link. Is this possible? I have tried using JQuery to simulate a click but that didn't work.

Thanks! Great work on the project.

Revisit event dispatcher - use `new Event`

Currently we use document.createEvent which is the old way to trigger events. The new way is something like this:

var elem = document.getElementById('myForm');
var event = new Event('submit');
elem.dispatchEvent(event);

Decouple show/hide mechanism from hash when JS available

My suggestion would be to decouple visibility of the modal from the hash once JS is available - reason being that this leaves the page's author with the possibility of using the hash as a means of navigation through his site (be it hashbang based or not).

This would also open ways to stack multiple modals on top of each other.

IE (including 10) does not open modals from other modals

If one modal is opened and you want to open another modal (later maybe stackable modals) Internet Explorer in all versions does not interpret the hash change correctly and closes the current modal without opening the new one.
IE8 doesn't even close the current modal.

Multiple YouTube videos bug

Hi guys,

I'd like to submit an update request. I'm experiencing a bug when trying to "load" or "use" multiple modal boxes with different YouTube iFrame's each (one vid for each modal).

However, when I click for instance in modal 1, and then close it (with or without having played the video), and then click to open modal 2 (containing another video), the same video that was on modal one shows up. BUT if I refresh the page, and open modal 2 first, then that video will show up in modal 1 instead.

Don't understand what's going on... I'm anyways no jQuery expert so... I'd love to know if anyone knows how to fix this.

Thanks a lot,
Santiago Baigorria

Better handling of keyboard navigation to be "accessible"?

As the term "accessible" is being used here, it's worth noting that ideally the modal should handle keyboard navigation a bit better - if it acts as a true modal, users that navigate via keyboard should, after opening the modal, only be able to tab/shift+tab through the links/elements of the modal itself until it's closed. this will require some additional JS to set initial focus into the modal, make sure that focus stays/cycles within the modal itself, and is returned back to the main page after the modal is closed.

Add different modal animation styles

The desktop version of the modal can have some different styles on how to show the modal. Currently we only have fade-in.

Here's a list of cool effects we could or already have implemented:

This could be more of a add on to the plugin rater than a must have.

If anyone is fancy on implementing some of these please ping in the issue.

Support dynamic content

I'd like to see support for loading content via AJAX. My usecase is that I have a list of items, and I'd like to open / view an item in a modal. It's not feasible to include the markup for every modal in the DOM, since this would be too much content.

Demo with pictures - are thumbnails meant to be clickable?

Very nice module btw :)

Is anything meant to happen on the demo with pictures - A slideshow, or perhaps the thumbnails are clickable? For me the modal opens and I see the main pic with thumbnails underneath, but nothing else happens.

I'm on OS X 10.8.3 and Chrome 26.0.1410.65.

How to increase modal-content height?

Good works guys, have used this in two web projects already.

Looking through the css and made some adjustment but it doesnt seem to work....how do one increase the height of the modal windows? the .modal-content if you will.

Thanks.

Research hardware acceleration for modal animation

When using fixed (position: fixed) elements on a page in connection with the hardware accelerated modal, the fixed elements are likely to break.
This problem only occurs in Webkit browsers. This does not happen on iOS, Android not tested yet.

There are two possible solutions:

  1. Media Query for hardware accelerated transitions. This is not clean as desktop-browsers might match these anyway.
  2. Using -webkit-transform-style: preserve-3d (maybe in connection with -webkit-backface-visibility: visible).

This needs to be researched further.

Lightbox Sizing

  1. Ability to handle sizing adjustments when viewport is resized upwards.
  2. Ability to handle multiple sizes instead of a global size set by a variable.

How to open model in javascript

Hello

I was wondering how can I open a modal box in javascript code. So I want it to open not a a click event but on a manually triggered event.

I want to perform an ajax in the

$.ajax({
        url: "basket.php?action=add&"+values,
        cache: false,
        method: "GET",
        async: false,
        complete: function(request) {
            // FIRE EVENT TO OPEN MODAL BOX 
                        //

            return false;
        }
    });

    return false;
}

how can I do this ?

Thanks in advance

Set aria-labelledby & id attributes via JS

Although it is nice to have that extra a11y piece in place I would suggest setting aria-labelledby and the corresponding id on a dialog's header part via JavaScript.

Why? I expect most people to copy & paste dialog code and to forget to adjust id and aria attributes accordingly. Also I suspect most users of your modal lib will not have the background needed to identify this problem.

By moving this part to JS you ensure a much better a11y across the board.

Bower is a pain w/customization

Love this, but one problem I have is bower. Bower is very powerful, but for things u really won't touch.

Tried using this project on bower, but wanted to change a whole load of stuff. Padding on the inner modal div, border color, width, breakpoints etc.

Maybe one of these days we can actually take advantage of a better package mgt. system. I just don't think we are there yet with them.

IOS question

Can't get modal window to fit safari/iphone5 (jumps to bottom of window and doesn't re-size) - any tips really welcome...
Works so well in everything else.

Suggestion on Modal's markup

Hi guys,

My suggestion is to remove the <header> and the <footer> tags from the modal's markup.

I'm more supporter of the view that specific markup for a webpage should be reserved for their real use, and not miss-use it as in the modal's case.

I don't like there to be several headers and footer on a same page. I believe the <header> and <footer> tags should be reserved for the page's logo, navigation, any footer content, footer navigation and copyright information.

That's all. I believe that for a more beautiful markup and and other SEO matters if these exist, I'd rather remove the mentioned tags.

Thanks a lot,
Santiago

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.