Coder Social home page Coder Social logo

pikabu's Introduction

Mobify Pikabu

A mobile-first content fly-in UI plugin.

Bower version Dependency Status Circle CI

Dependencies

Velocity

If you are using Zepto, you need to load bower_components/mobify-velocity/velocity.js (this file comes with a jQuery shim bundled directly in it). If you are using jQuery, you need to load bower_components/velocity/jquery.velocity.js.

jQuery Support

Pikabu supports jQuery but is not actively developed for it. You should be able to use Pikabu directly with jQuery 2.0. While we don't actively support jQuery for Pikabu, we welcome any and all issues and PRs to help us make it work.

Installation

Pikabu can be installed using bower:

bower install pikabu

Usage with Require.js

We highly recommend using Require.js with Pikabu. To use Require, you have to reference Pikabu, Pikabu's effect modules, and Pikabu's dependencies inside your require config file:

{
    'paths': {
        'plugin': 'bower_components/plugin/dist/plugin.min',
        'pikabu': 'bower_components/pikabu/dist/pikabu.min',
        'shade': 'bower_components/shade/dist/shade.min',
        'lockup': 'bower_components/lockup/dist/lockup.min',
        'deckard': 'bower_components/deckard/dist/deckard.min',
        'bouncefix': 'bower_components/bouncefix.js/dist/bouncefix.min',
        'velocity': 'bower_components/mobify-velocity/velocity',
        // or jQuery version 'velocity': 'bower_components/mobify-velocity/jquery.velocity',
        
        'drawer-left': 'bower_components/pikabu/dist/effect/drawer-left',
        'drawer-right': 'bower_components/pikabu/dist/effect/drawer-right'
        // There are a few more within the 'effect' folder
    }
}

And then require Pikabu in as needed:

define([
    'zepto',
    'modal-center',
    'pikabu'
    ],
    function($, modalCenter) {
        $('.pikabu').pikabu({
            effect: modalCenter
        });
    }
);

Usage

Pikabu requires very minimal markup. All Pikabu needs is a div with your content and it will automatically transform into what we need.

To avoid any unwanted FOUT, decorate the content you will be passing to Pikabu with the hidden attribute. We will remove that attribute when Pikabu is initialized.

For accessibility and functional purposes, Pikabu will wrap all of your body content in a wrapping container. This could conflict with other plugins that alter your page's markup. If you're seeing issues, try initializing Pikabu after your other plugins. If you want to specify your own wrapping container, add a class of lockup__container to the element. This element should be a root level element to be effective. You can also pass Pikabu a container parameter.

<!-- Include the CSS -->
<link rel="stylesheet" href="pikabu.min.css">

<!-- Optionally include the Theme file -->
<link rel="stylesheet" href="pikabu-style.min.css">

<!-- Optionally include a wrapping container -->
<div id="bodyContent" class="pikabu__body-wrapper">
    Your specified body content
</div>

<!-- Include the markup -->
<div id="yourPikabu" hidden>
    Your pikabu content
</div>

<!-- Include dependencies -->
<script src="zepto.min.js"></script>
<script src="velocity.min.js"></script>
<script src="plugin.min.js"></script>
<script src="shade.min.js"></script>
<script src="lockup.min.js"></script>
<script src="deckard.min.js"></script>
<script src="bouncefix.min.js"></script>

<!-- Include the effect module you want to use -->
<script src="effect/drawer-left.js"></script>
<!-- Include pikabu.js -->
<script src="pikabu.min.js"></script>

<!-- Construct Pikabu -->
<script>$('#yourPikabu').pikabu()</script>

Initializing the plugin

pikabu()

Initializes the pikabu.

$('#myPikabu').pikabu({
    effect: modalCenter
});

You can also initialize the Pikabu through the use of a data attribute. The attribute takes a value equal to the effect you want to use.

<div id="myPikabu" data-pikabu="sheet-bottom">

You must pass Pikabu an effect for it to work.

pikabu(options)

Initialize with options.

$('#myPikabu').pikabu({
    effect: sheetBottom,
    container: '#container',
    structure: {
        header: 'My Pikabu Title',
        footer: false
    },
    zIndex: 2,
    cssClass: 'my-pikabu-class',
    coverage: '100%',
    easing: 'swing',
    duration: 200,
    shade: {
        color: '#404040'
    },
    open: noop,
    opened: noop,
    close: noop,
    closed: noop
});

Options

effect

default: { open: noop, close: noop },

Specifies which effect module Pikabu should use when opening. Effect modules allow you to load specific functionality that tell Pikabu how to open and close. Available effect modules can be found in the dist/effect folder. Current effect modules include:

  • Modal Center - opens Pikabu in the center of the screen
  • Sheet Top - slides down from the top of the screen
  • Sheet Bottom - slides up from the bottom of the screen
  • Sheet Left - slides in from the left of the screen
  • Sheet Right - slides in from the right of the screen
$('#myPikabu').pikabu({
    effect: sheetLeft
});

container

default: $container (lockup's container)

Specify the container Pikabu will be created within

$('#myPikabu').pikabu({
    container: $('#mainForm') // or container: '#mainForm'
});

appendTo

default: null

Specify the element Pikabu will be appended to. By default Pikabu will be appended to the lockup container. If you want it to be appended outside the lockup container, specify that element here.

$('#myPikabu').pikabu({
    appendTo: 'body'
});
structure

default: { header: '', footer: false }

Defines the structure to use for Pikabu. Specifically, Pikabu tries to build its own HTML structure if passed the default options.

If you want to have full control over the HTML of your Pikabu, including the header, footer, and content section, set structure: false. Setting structure: false will still allow the close event to be bound to any element that has the pikabu__close class, allowing you to specify the element that should trigger closing your Pikabu.

If you are using structure: false, you will need to structure your HTML to include the following elements (missing any elements will cause Pikabu to not function):

<div id="myPikabu" class="pikabu__wrapper" role="document" hidden>
    <div class="pikabu__header">
        <a class="pikabu__close">close</a>
    </div>
    <div class="pikabu__content pikabu--is-scrollable"></div>
    <div class="pikabu__footer"></div>
</div>

Please see below for available sub-options for header and footer.

structure.header

default: ''

Sets the header that Pikabu should use in its header bar. Valid values are:

  • boolean - specifies no default header generated. If chosen, the user is required to specify the header markup themselves, including the appropriate class, pikabu__header. It will be expected that this will be a part of the element that is used to invoke pikabu.
  • string - specifies the title text used in the header. The header structure will be generated automatically.
  • html|element - specifies the HTML to be used for the header.
// generates no header
$('#myPikabu').pikabu({
    structure: {
        header: false
    }
});

or

// generates a default header with the title "My Pikabu"
$('#myPikabu').pikabu({
        structure: {
            header: 'My Pikabu'
        }
    });

or

$('#myPikabu').pikabu({
    structure: {
        header: '<header class="pikabu__header">My Pikabu<button class="pikabu__close">Close</button></header>'
    }
});
structure.footer

default: false

Sets the footer that Pikabu should use in its footer. Valid values are:

  • boolean - specifies no default footer generated. If chosen, the user is required to specify the footer markup themselves, including the appropriate class, pikabu__footer.
  • string - specifies the title text used in the footer. The footer structure will be generated automatically.
  • html|element - specifies the HTML to be used for the footer.
// generates no footer
$('#myPikabu').pikabu({
    structure: {
        footer: false
    }
});

or

// generates a default footer with the contents "My Footer"
$('#myPikabu').pikabu({
    structure: {
        footer: 'My Footer'
    }
});

or

$('#myPikabu').pikabu({
    structure: {
        footer: '<footer class="pikabu__footer">My Footer</footer>'
    }
});
zIndex

default: 2

Sets the z-index value for Pikabu. Use this value if you need to specify a specific stacking order.

$('#myPikabu').pikabu({
    zIndex: 10
});
cssClass

default: ''

Sets a class to apply to the main Pikabu parent element for ease of styling.

#('#myPikabu').pikabu({
    cssClass: 'my-pikabu-class'
});
coverage

default: 80%

Sets the coverage value. This will allow you to specify that the pikabu covers only a portion of the screen.

$('#myPikabu').pikabu({
    coverage: '80%'
});
duration

default: 200

Sets the duration for the animation.

$('#myPikabu').pikabu({
    duration: 600
});
shade

default: {}

Specifies whether pikabu should use the shade overlay. You can pass options through to Shade using this property. For more information on available options, see the Shade documentation.

Warning: We currently force Shade's duration to match the one provided to Pikabu. This is to limit DOM thrashing as much as possible during Pikabu's animation. Pikabu hitches a little if we don't do this.

$('#myPikabu').pikabu({
    shade: {
        color: '#333333'
    }
});
easing

default: swing

Sets the easing for the animation. Pikabu takes all of the same easing properties that Velocity.js accepts.

  • jQuery UI's easings and CSS3's easings ("ease", "ease-in", "ease-out", and "ease-in-out"), which are pre-packaged into Velocity. A bonus "spring" easing (sampled in the CSS Support pane) is also included.
  • CSS3's bezier curves: Pass in a four-item array of bezier points. (Refer to Cubic-Bezier.com for crafing custom bezier curves.)
  • Spring physics: Pass a two-item array in the form of [ tension, friction ]. A higher tension (default: 600) increases total speed and bounciness. A lower friction (default: 20) increases ending vibration speed.
  • Step easing: Pass a one-item array in the form of [ steps ]. The animation will jump toward its end values using the specified number of steps.

For more information, check out Velocity's docs on easing.

$('#myPikabu').pikabu({
    easing: 'ease-in-out'
});
open

default: function(e, ui) {}

Triggered every time the selected pikabu item is starting to open.

Parameters

Parameter name Description
e An Event object passed to the callback
ui An object containing any associated data for use inside the callback
$('#myPikabu').pikabu({
    open: function(e, ui) {
        // ui.item contains the item opening
    }
});
opened

default: function(e, ui) {}

Triggered every time the selected pikabu item has finished opening.

Parameters

Parameter name Description
e An Event object passed to the callback
ui An object containing any associated data for use inside the callback
$('#myPikabu').pikabu({
    opened: function(e, ui) {
        // ui.item contains the item that opened
    }
});
close

default: function(e, ui) {}

Triggered every time an pikabu item is starting to close.

Parameter name Description
e An Event object passed to the callback
ui An object containing any associated data for use inside the callback
$('#myPikabu').pikabu({
    close: function(e, ui) {
        // ui.item contains the item closing
    }
});
closed

default: function(e, ui) {}

Triggered every time an pikabu item is finished closing.

Parameter name Description
e An Event object passed to the callback
ui An object containing any associated data for use inside the callback
$('#myPikabu').pikabu({
    closed: function(e, ui) {
        // ui.item contains the item that closed
    }
});

Methods

Open

Open the selected pikabu item by element reference

$pikabu.pikabu('open');

Close

Close the selected pikabu item by element reference

$pikabu.pikabu('close');

Pikabu will automatically trigger close on elements decorated with the class name pikabu__close.

<button class="pikabu__close">Close</button>

Browser Compatibility

Browser Version Support
Mobile Safari 5.1.x Degraded. Form inputs cause scroll issues while typing.
Mobile Safari 6.0+ Supported.
Chrome (Android) 1.0+ Supported.
Android Browser 4.0+ Degraded. No scroll locking.
IE for Win Phone 8.0+ Degraded. No scroll locking.
Firefox (Android) 23.0+ Supported. (Support may exist for earlier versions but has not been tested)

Known Issues

Currently, form inputs and selects inside of Pikabu have issues on iOS7 and under. This is due to not being able to lock scrolling without causing rendering issues as well as iOS attempting to scroll the page when the keyboard opens. Forms work but will cause some visual jumping.

Building a distribution

Requirements

Steps

  1. npm install
  2. bower install
  3. grunt build

The dist directory will be populated with minified versions of the css and javascript files for distribution and use with whatever build system you might use. The src directory has our raw unminified Sass and Javascript files if you prefer to work with those.

License

MIT License. Pikabu is Copyright © 2014 Mobify. It is free software and may be redistributed under the terms specified in the LICENSE file.

pikabu's People

Contributors

donnielrt avatar highruned avatar incredimike avatar kpeatt avatar tedtate avatar vmarta 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  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

pikabu's Issues

Multiple Pikabus should make multiple shades

Right now, because shade is instantiated on the Pikabu container and not on the individual Pikabus, you can't have more than one shade. Which means the first shade you instantiate is the only shade you get. Should we allow for multiple shades for each Pikabu on the page? My thought is: yes.

Desktop Chrome is given a wrong height due to Chrome for Android Check

For some reason when Pikabu adds the height, it's much bigger than the actual viewport height. I've been at this a few hours and I can't locate what's causing it. I'm using Chrome 36. I'm wondering if it's something within my CSS files but I haven't been able to track it down.

var windowHeight = this.device.isNewChrome ? window.outerHeight : $(window).height();

I've fixed the issue by removing the check for Chrome but I'm a little wary of keeping this as I'm not sure I understand the reason this check is made. I get that window.outerHeight grabs the height of everything including toolbars etc? Just not sure why you'd need to do that.

Pikabu 2.0: Non-standard classes don't work

Pikabu 2.0 works if you use the default class names in your HTML, but not if you try to specify different classes upon initialization.

For example:

    var pikabu = $('.m-pikabu-left').pikabu({
            container: '.m-pikabu-container',
            appendTo: '.m-pikabu-viewport',
            effect: drawerLeft,
            zIndex: 2,
            coverage: '80%',
            easing: 'swing',
            duration: 200,
            shade: {
                zIndex: 2
            }
        });

This will correctly update this.options, however, this does not update the classes object. Because we access both this.options and classes within Pikabu, this is causing inconsistent behaviour.

Sliding animation is not consistent

http://mobify.github.io/pikabu/

It's easy to see.
Open: you cant see Left coming in from the side, as it's already there.
Close: you see Left going away to the side.

The Right side is consistent though. I imagine it is due to some sort of width tweening, doing it from the right side, so it's only noticeable on Left while opening? Not sure.

Old IE support

Any interest in a pull request for old IE patches and possible support of IE 7? I'd like to use this project but I need to be able to support old corporate machines that suck.

Pikabu 2.0: how to mark up the body content

The readme for Pikabu 2.0 needs to indicate what the minimum expected markup that works.

Currently, the readme essentially asks you to do this:

<div id="yourPikabu" hidden>
    Your pikabu content
</div>
<script>$('#yourPikabu').pikabu()</script>

But that's not enough.. it doesn't say how to mark up the body content too. I had to add the following markup in current project:

<div class="pikabu">
    <div class="pikabu__container">
        // header, main, footer would go here
    </div>
</div>

What is supposed to be the markup for it? Thanks.

Reducing the size of the browser

Hi,

First thanks for the awesome pikabu. Playing with it I noticed possibly a bug

When reducing the browser size the height is having a bit of issues.

How to Reproduce

  1. Open the file.
  2. Reduce the size of the browser.
  3. Check if the last sentence Am I am visible is visible.

In chrome (37.0.2062.94 ), on first reducing the sentence is visible. When changing again to full size the scrollbar disappears.

In Mozilla 32 reducing don't show the scroll bar itself.

It could not detect when I increase the font size also. See code below.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="author" content="Mobify">
    <meta name="description" content="A responsive, mobile first accordion UI module from Mobify">
    <meta name="keywords" content="mobify,mobile,modules,ui,responsive,carousel,scooch,slider">
    <title>Mobify Modules</title>

    <link rel="stylesheet" href="http://cdn.mobify.com/modules/pikabu/0.2.2/pikabu.css">
    <link rel="stylesheet" href="http://cdn.mobify.com/modules/pikabu/0.2.2/pikabu-theme.css">

    <link rel="shortcut icon" href="/static/img/favicon.ico">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body>
<div class="m-pikabu-viewport">
    <!-- the left sidebar -->
    <div class="m-pikabu-sidebar m-pikabu-left">
        <!-- left sidebar content -->
        Left
    </div>
    <!-- the main page content -->
    <div class="m-pikabu-container">
        <!-- Overlay is needed to have a big click area to close the sidebars -->
        <div class="m-pikabu-overlay"></div>
        <header>
            <a class="m-pikabu-nav-toggle" data-role="left">Left Menu</a>
            <h1>Pikabu</h1>
            <a class="m-pikabu-nav-toggle" data-role="right">Right Menu</a>
        </header>
        <section>
            <!-- Body content goes in here -->
            <h2><strong>Pikabu</strong> is a speedy, flexible framework for off-canvas flyout panels.</h2>

            <h3>Why use <strong>Pikabu</strong>?</h3>

            <p><em>Simple markup</em> &mdash; Few containers and classes means implementation is a breeze.</p>

            <p><em>Native scrolling</em> &mdash; Just like mom used to make. Momentum scrolling in sidebars and smart fallbacks for browsers that don&rsquo;t support it.</p>

            <p><em>Customization</em> &mdash; No theme, just barebones HTML and CSS. Pikabu is super customizable to your needs.</p>

            <p><em>Compatibility</em> &mdash; This thing works on everything. We progressively enhance the experience for devices that support it.</p>

            <p><em>Simple markup</em> &mdash; Few containers and classes means implementation is a breeze.</p>

            <p><em>Native scrolling</em> &mdash; Just like mom used to make. Momentum scrolling in sidebars and smart fallbacks for browsers that don&rsquo;t support it.</p>

            <p><em>Customization</em> &mdash; No theme, just barebones HTML and CSS. Pikabu is super customizable to your needs.</p>

            <p><em>Compatibility</em> &mdash; This thing works on everything. We progressively enhance the experience for devices that support it.</p>


            <p><em>Simple markup</em> &mdash; Few containers and classes means implementation is a breeze.</p>

            <p><em>Native scrolling</em> &mdash; Just like mom used to make. Momentum scrolling in sidebars and smart fallbacks for browsers that don&rsquo;t support it.</p>

            <p><em>Customization</em> &mdash; No theme, just barebones HTML and CSS. Pikabu is super customizable to your needs.</p>

            <p><em>Compatibility</em> &mdash; This thing works on everything. We progressively enhance the experience for devices that support it.</p>


            <p><em>Simple markup</em> &mdash; Few containers and classes means implementation is a breeze.</p>

            <p><em>Native scrolling</em> &mdash; Just like mom used to make. Momentum scrolling in sidebars and smart fallbacks for browsers that don&rsquo;t support it.</p>

            <p><em>Customization</em> &mdash; No theme, just barebones HTML and CSS. Pikabu is super customizable to your needs.</p>

            <p><em>Compatibility</em> &mdash; This thing works on everything. We progressively enhance the experience for devices that support it.</p>

            <p><em>Simple markup</em> &mdash; Few containers and classes means implementation is a breeze.</p>

            <p><em>Native scrolling</em> &mdash; Just like mom used to make. Momentum scrolling in sidebars and smart fallbacks for browsers that don&rsquo;t support it.</p>

            <p><em>Customization</em> &mdash; No theme, just barebones HTML and CSS. Pikabu is super customizable to your needs.</p>

            <p>Am I am visible</p>
        </section>
    </div>
    <!-- the right sidebar -->
    <div class="m-pikabu-sidebar m-pikabu-right">
        <!-- right sidebar content -->
        Right
    </div>
</div>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://cdn.mobify.com/modules/pikabu/0.2.1/pikabu.min.js"></script>
<script>
    $(function() {
        pikabu = new Pikabu();
    });
</script>
</body>
</html>

See attached image from firefox.

Thank you.
screenshot from 2014-10-03 12 57 07

Error after opening drawer

I currently have pikabu configured and working great in a project locally. When the screen is resized smaller, I set up and enable pikabu, and when it becomes larger I undo all of that and display my UI normally for desktop view. This is working fine, except for that it doesn't return my UI back to normal desktop view after I pull a drawer out. I get this error in my console:

Uncaught TypeError: Cannot read property 'scrollHeight' of undefined

So, doing some digging, I found that it's looking for this:

https://github.com/mobify/pikabu/blob/master/src/pikabu.js#L516-L517

And that the sidebar is set here:

https://github.com/mobify/pikabu/blob/master/src/pikabu.js#L417

I found that when I accessed my pikabu object, that pikabu.activeSidebar contained null. Fantastic! "I can solve this!" I thought. So I manually called pikabu.openSidebar('left') which worked, but I still got the Cannot read properly 'scrollHeight' of undefined error. I checked pikabu.activeSidebar to see what it held, and it was holding left as expected. Hmn.

So then I took a look at pikabu.$sidebars and found that it was indeed holding an object with left and right. I tried running pikabu.$sidebars['left'] then, and got []. I then tried pikabu.$sidebars.left and still got [].

screen shot 2014-09-18 at 8 46 41 am

Any idea how to solve this? Is there something else I should be doing? This is how I am initing pikabu:

    self.pikabu = new Pikabu({
      viewportSelector: '.body-chatter',
      widths: {
        left: '90%',
        right: '90%'
      },
      selectors: {
        element: '#candy'
      }
    });

I have also set my m-pikabu-sidebar m-pikabu-left (and right) classes, as well as m-pikabu-nav-toggle and data-role='left' stuff on the toggle buttons.

Any input/help/advice would be greatly appreciated. Thanks!

closeSiderbars() not a function

I'm trying to enable a close button for my menu with closeSidebars(), but the function doesn't seem to work. These are my settings(in coffeescript):

    pikabu = new Pikabu
        viewportSelector: '#page'
        widths:
            right: '90%',
        selectors:
            element: '.m-pikabu-container',
            common: '.m-pikabu-sidebar',
            right: '.m-pikabu-right'
            navToggles: '.m-pikabu-nav-toggle'
        onOpened: ->
            header.addClass "header-opened"
            closer.closeSidebars()

But i'm getting the "undefined is not a function" error. Could somebody help me?

Thanks!

Closing animation is jerky

Requires pikabu to be accessible after scrolling a page.

Scroll page, open the pikabu menu, then close the pikabu menu. The animation to return to the original screen position is jerky and appears broken.

Minimal test case to follow

Firefox display: -moz-box unnecessary?

.m-pikabu-viewport {
    backface-visibility: hidden;
    display: -moz-box;
    overflow: hidden;
    position: relative;
    transform: translateZ(0px);
}

This behaves very strange in firefox. The pikabu-viewport doesn't span the overal width of the browser viewport. If I disable display: -moz-box;it works well.

Max-width px sidebar

Is it possible to give the sidebar a max-width of 300px for example? We want the sidebar in all devices so also on desktop but the sidebar has a width of 80%. When we add a max-width that's not working correctly!

Screen jumps when typing in inputs on legacy Android

These three lines in the css are causing all the trouble, and we need a way to not load these particular rules on older Android devices:

@include perspective(1000);
@include transform(translateZ(0));
@include backface-visibility(hidden);

Viewport height with expandable/collapsible items hides content

At the moment height of the viewport is set by the script as a fixed height based on the content. If the content contains expandable/collapsible items that are defaulted to collapsed, the viewport's "overflow: hidden;" style hides content when items expand.

Is there a fix for this?

.m-pikabu-nav-toggle position:fixed inside viewport isn't fixed

This works fine:

<a class="m-pikabu-nav-toggle" style="position:fixed;">Toggle</a>  
<div class="m-pikabu-viewport">
    [Content]
</div>

But this doesn't:

<div class="m-pikabu-viewport">
    <a class="m-pikabu-nav-toggle" style="position:fixed;">Toggle</a>  
    [Content]
</div>

It's caused by the compination of position:fixed and -webkit-transform (Further explained here: https://code.google.com/p/chromium/issues/detail?id=20574)

Any ideas how to fix this? Any work arounds?

Remove Compass/CSS3 Dependncy

If added to adaptive.js project as bower component, the scss requires “compass/css3”.
Fix the dependency so that pikbu.scss could be added to the project and built.

Scroll locks in Chrome for Android and iOS

At first scroll works fine, but after a few seconds and/or if you scroll back to the top, scrolling gets disabled.

I was even able to lock the scrolling on the Pikabu demo page by scrolling up a down a few times with Chrome on my Android 4.4.2 (Galaxy S4).

I tested this in Safari on iOS and on the Android native browser and it worked fine. Seems to just be an issue on Chrome mobile.

extra white space on Android 4 browsers

I am getting an extra white space between the menu and the main content area that I can't get rid of on Android browser 4.0.4. The issue comes up when viewing the live demo as well.

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.