Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change number of panels #12

Closed
chadallenmx opened this issue Mar 10, 2016 · 1 comment
Closed

Change number of panels #12

chadallenmx opened this issue Mar 10, 2016 · 1 comment

Comments

@chadallenmx
Copy link

How would I change the number for panels from the default 10 to say, 20?
I thought this would do it but no dice.

$(document).ready ( function(){
var myDoormat = new Doormat();
"panels": 10
});

Thanks.

@jh3y
Copy link
Owner

jh3y commented Mar 12, 2016

Hi @chadallenmx ,

Sorry for the delayed response. The amount of panels is actually config driven at build time.

The default is 10 defined in doormat.config.json. The output regarding panels is;

.dm__pnl:nth-of-type(1) {
  z-index: 998;
}
.dm__pnl:nth-of-type(2) {
  z-index: 997;
}
.dm__pnl:nth-of-type(3) {
  z-index: 996;
}

Merely a z-indexing issue on the CSS side. There are two options that spring to mind. One could be to roll out a custom build of doormat providing a higher number of panels. The other would be to add the remaining z-index declaration to your CSS or using a for loop with the preprocessor of your choice etc.

.dm__pnl:nth-of-type(11) {
  z-index: 988;
}
.dm__pnl:nth-of-type(12) {
  z-index: 987;
}
.dm__pnl:nth-of-type(13) {
  z-index: 986;
}

Stylus loop;

for i in (10..20)
  &:nth-of-type({i})
    z-index 999 - i

@jh3y

@jh3y jh3y closed this as completed Mar 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants