-
Notifications
You must be signed in to change notification settings - Fork 17
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
feature request: some kind of resize support #26
Comments
OK, I'll add the extra classes. I will try to make a release today. |
Thanx alot!! |
Done in 3.4.2. The CSS classes that specify the chess pieces is now completely separated from the CSS classes that define the size of the sprites, and there is no inlined "background-position" instructions left. |
This is REALLY better than i hoped :) . With very little css code you do it perfectly!!!!! uichess-chessboard-square, .uichess-chessboard-cell {min-width: 53px! important; width: 53px !important; height: 53px !important;}
.uichess-chessboard-sprite60 { width: 53px !important; height: 53px !important; background-position: -850px 0px !important; } so if i want to "map" the 60px board to the 53px, just do that, plus copy the background-position from the 53px background position and redefine the sprite60 via a new rule. Just perfect and simple |
Hey Buffos and Yoann, today I discovered that the plugin works nicely on an iPhone 6, but when you look at the chessboard on a iPhone 5 or older one (smaller screen) the h-file is missing. Is this something you both managed to fix by using the css code as mentiod by Buffos above? Thank you both very much for your answer! |
Hi,
In plain English, the meaning of this code is: for a device whose screen width is less than 320 pixels, square size will be clamped to 28 pixel, whatever the other settings. You can adapt this code to set up different screen-width and/or max-square-size thresholds. For your information, the CSS classes |
Hey Yoann, thanks! Am I missing something? |
Hum, from what you report, I'm surprised it does not work. I have no iPhone, so I cannot test by myself. Maybe you try to replace What is the address of your website? |
Did you try my css code above? |
Hey guys, sorry for my late response. The webpage I'm talking about is www.http://schaaktrainer.nl/schaakpartijen/ uichess-chessboard-square, .uichess-chessboard-cell {min-width: 30px! important; width: 30px !important; height: 30px !important;} As you can see on the webpage the pieces don't fit in the squares anymore so my guess is that I'm doing something wrong here. Also on an iPhone 4 the board still doesn't fit on the 960x640 screen. That's strange anyway because 8 x 35 pixels = 280 pixels so in theory there could be two chessboards next to each other because that's still less then 640 pixels, but in reality one board doesn't fit. I'm confused because I've tried everything to make this work. |
Change the background position with the correct one (you will find it in the css of the plugin) if you look at that css, the background value for 30px is -67px -35px !important Just change -850px 0px !important; to that and it works fine (i checked it) |
Great Buffos, many thanks! |
I've just released a new version of the plugin (3.5), that provides integrated support for small-screen devices through media queries (see in the settings page). By the way, CSS classes have changed in this version: what used to be |
The only basic drawback i see in this plugin (everything else is just added features that one can ask) is difficult to use in a responsive web design.
I tried through media queries but there is one thing missing
For example you can add a
but you cannot adjust the background position since you do not know which piece it is
if you had an extra class in the piece , for example black_knight , depending on the piece, you could adjust the background position , to find the piece, by adding few more statements to the above query
That way, one could create a responsive version of the board
So in short, the feature request is "when you output a piece on the board, just add a class with a name to show what piece it is (or if its the turnflag). The rest are taken care from the media query above (adjusted as one needs)
The text was updated successfully, but these errors were encountered: