Created
October 11, 2013 08:49
-
-
Save machal/6931671 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .wm-p-file { | |
| clear: both; | |
| .wm-m-section; | |
| list-style-type: none; | |
| padding: 0; | |
| } | |
| // Vnitrni blok | |
| .wm-p-file { | |
| .in { | |
| margin: 0 0 0 17px; | |
| position: relative; | |
| // Odrážka jako u UL/LI seznamu | |
| &:before { | |
| position: absolute; | |
| left: -17px; | |
| color: @linkColor; | |
| content: "\25aa"; | |
| } | |
| } | |
| } | |
| // Pokud je souborů ke stažení vedle sebe více, pagelet se neodsazuje | |
| .wm-p-file + .wm-p-file { | |
| margin-top: -1.75*@baseLineHeight; | |
| @media (max-width: @wmSmallDisplayEnd) { | |
| margin-top: -.75*@baseLineHeight; | |
| } | |
| } | |
| // Odkaz se jmenem souboru | |
| .wm-p-file a.name { | |
| color: @textColor; | |
| font-weight: bold; | |
| line-height: 19px; | |
| &:hover, | |
| &:focus, | |
| &:active { | |
| color: @linkColor; | |
| } | |
| } | |
| // --- Varianta: s ikonou --- | |
| // Souradnice pro pozicovani ikonky ze spritu | |
| @iconWidth: 35px; | |
| @iconHeight: 36px; | |
| @spriteHeight: 66px; | |
| @spriteMarginTop: 15px; | |
| @spriteMarginLeft: 19px; | |
| @spriteMarginBetween: 11px; | |
| @spriteIconWidth: 30px; | |
| .wm-p-file[class*="with-icon"] { | |
| .in { | |
| padding-left: 45px; | |
| margin-left: 0; | |
| } | |
| a.name { | |
| display: block; | |
| } | |
| small { | |
| display: block; | |
| margin-top: -.15*@baseLineHeight; | |
| } | |
| // U varianty s ikonkou odrazky nejsou | |
| .in:before { | |
| content: ""; | |
| } | |
| a.icon { | |
| display: block; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: @iconWidth; | |
| height: @iconHeight; | |
| //background-image: url("../../../_common/images/file_icons.svg"); | |
| background-image: url("http://www.webmium.com/CDN/css/client/pagelet/downloadfile/file_icons.svg"); | |
| background-repeat: no-repeat; | |
| .background-size(auto @spriteHeight); | |
| // Varianta bez podpory SVG (IE8, Android Browser 2.3-) | |
| .no-svg & { | |
| //background-image: url("../../../_common/images/file_icons.png"); | |
| background-image: url("http://www.webmium.com/CDN/css/client/pagelet/downloadfile/file_icons.png"); | |
| } | |
| } | |
| } | |
| // --- Generovani jednotlivych ikonek --- | |
| // Mixin co generuje kod pro jednotlive ikony ze spritu file_icons.svg | |
| // @icon je string co oznacuje typ ikony | |
| // @positionX je poradi ikony ve spritu, prvni je 0 | |
| .generate-icon(@icon, @positionX) { | |
| (~".wm-p-file.with-icon-@{icon} a.icon") { | |
| background-position: @positionX -1*@spriteMarginTop; | |
| } | |
| } | |
| // Generovani pozic pozic ikonek mixinem | |
| .generate-icon(avi, -20px); | |
| .generate-icon(bmp, -62px); | |
| .generate-icon(doc, -103px); | |
| .generate-icon(jpeg, -145px); | |
| .generate-icon(jpg, -187px); | |
| .generate-icon(mp3, -228px); | |
| .generate-icon(mp4, -270px); | |
| .generate-icon(mpeg, -311px); | |
| .generate-icon(mpg, -353px); | |
| .generate-icon(pdf, -395px); | |
| .generate-icon(png, -436px); | |
| .generate-icon(pps, -478px); | |
| .generate-icon(ppt, -520px); | |
| .generate-icon(rar, -561px); | |
| .generate-icon(rtf, -603px); | |
| .generate-icon(txt, -644px); | |
| .generate-icon(xls, -686px); | |
| .generate-icon(zip, -727px); | |
| .generate-icon(general, -768px); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment