Making WordPress.org

Changeset 1456


Ignore:
Timestamp:
03/27/2015 09:25:01 PM (10 years ago)
Author:
coffee2code
Message:

wp4.css: Add responsive styling for selected w.org pages (namely /download/* and /mobile for now).

The pages need to be subsequently modified to opt into the styling by assigning the appropriate new class names.

Props hugobaeta for initial patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/style/wp4.css

    r1391 r1456  
    17951795    margin: -10px 10px 0;
    17961796}
     1797
     1798/* Responsive styling ---------------------------------- */
     1799
     1800.wporg-page-download .mobile-notice {
     1801    display: none;
     1802}
     1803.wporg-page-download .download-button-container {
     1804    text-align: center;
     1805}
     1806.wporg-page-mobile ul#books {
     1807    display: -webkit-box;
     1808    display: -moz-box;
     1809    display: -ms-flexbox;
     1810    display: -webkit-flex;
     1811    display: flex;
     1812    flex-wrap: wrap;
     1813}
     1814.wporg-page-mobile #books li {
     1815    width: 49%;
     1816    margin-left: 1%;
     1817}
     1818.wporg-page-mobile #books li:first-child {
     1819    margin-left: 0;
     1820    margin-right: 1%;
     1821}
     1822.wporg-responsive.wporg-page-mobile #books p {
     1823    margin-bottom: 14px;
     1824}
     1825.wporg-responsive.wporg-page-mobile #books li {
     1826    padding: 0 14px 15px;
     1827    box-sizing: border-box;
     1828}
     1829.wporg-responsive.wporg-page-mobile #books h3 {
     1830    margin-bottom: 15px;
     1831}
     1832.wporg-responsive.wporg-page-mobile #books .image {
     1833    float: right;
     1834    border-right: 0;
     1835    border-left: 1px solid #dadada;
     1836    margin-left: 14px;
     1837    margin-right: 0;
     1838    margin-top: 0;
     1839}
     1840
     1841.wporg-responsive.wporg-page-download .col-7, body.wporg-responsive.wporg-page-parent-download .col-8 {
     1842    margin-left: 160px;
     1843}
     1844.wporg-responsive.wporg-page-download .col-2, body.wporg-responsive.wporg-page-parent-download .col-2 {
     1845    position: absolute;
     1846}
     1847
     1848@media screen and (max-width: 974px) {
     1849    body.wporg-responsive #pagebody .wrapper {
     1850        display: -webkit-box;
     1851        display: -moz-box;
     1852        display: -ms-flexbox;
     1853        display: -webkit-flex;
     1854        display: flex;
     1855        flex-wrap: wrap;
     1856    }
     1857    body.wporg-responsive .col-2,
     1858    body.wporg-responsive .col-3,
     1859    body.wporg-responsive .col-7,
     1860    body.wporg-responsive .col-10,
     1861    body.wporg-responsive .col-12 {
     1862        width: inherit;
     1863        float: none;
     1864    }
     1865
     1866    body.wporg-responsive.wporg-page-parent-download .col-2 {
     1867        position: inherit;
     1868        width: 100%;
     1869    }
     1870
     1871    body.wporg-responsive.wporg-page-parent-download .col-8 {
     1872        margin-left: 14px;
     1873        width: 100%;
     1874    }
     1875
     1876    .wporg-responsive.wporg-page-mobile #books li {
     1877        width: 100%;
     1878        margin-left: 0;
     1879        margin-right: 0;
     1880    }
     1881
     1882    /*
     1883     * /download
     1884     */
     1885
     1886    .wporg-responsive.wporg-page-download .col-2 {
     1887        position: inherit;
     1888        float: left;
     1889        width: 50%;
     1890        margin: 0;
     1891        box-sizing: border-box;
     1892        padding: 0 14px;
     1893    }
     1894    .wporg-responsive.wporg-page-download .col-3 {
     1895        float: right;
     1896        width: 50%;
     1897        margin: 0;
     1898        box-sizing: border-box;
     1899        padding: 0 14px;
     1900    }
     1901    .wporg-responsive.wporg-page-download .col-7 {
     1902        margin-left: 14px;
     1903        width: 100%;
     1904        margin-bottom: 3em;
     1905        padding-bottom: 2em;
     1906        border-bottom: 1px solid #ccc;
     1907    }
     1908
     1909}
     1910@media screen and (max-width: 480px) {
     1911    .wporg-responsive.wporg-page-download .col-7 {
     1912        border-bottom: 0;
     1913    }
     1914    .wporg-responsive.wporg-page-download #sidebar, .wporg-responsive.wporg-page-download .col-7 {
     1915        width: 90%;
     1916        float: none;
     1917        margin: 0 auto;
     1918    }
     1919    .wporg-responsive.wporg-page-download .col-3 {
     1920        margin-top: 2em;
     1921        border-top: 1px solid #ccc;
     1922        padding-top: 3em;
     1923        width: 90%;
     1924        float: none;
     1925        margin: 2em auto;
     1926    }
     1927    .wporg-page-download .mobile-notice {
     1928        display: block;
     1929        width: 60%;
     1930        margin: 1px auto 3em;
     1931        border: 1px solid #ccc;
     1932        padding: 2em 1.9em 0.5em;
     1933    }
     1934    .wporg-page-download .mobile-notice-inner {
     1935        display: none;
     1936    }
     1937}
Note: See TracChangeset for help on using the changeset viewer.