-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(frontend): update next config to support IE10 - IE11
* fix(ie11): add P3P header * fix(ie11): fix some CSS issues * fix(ie11): force non ES6 module transpilation * fix(frontend): add IE10 support :hell: fix #229 fix #88
- Loading branch information
Showing
9 changed files
with
161 additions
and
120 deletions.
There are no files selected for viewing
This file contains 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
171 changes: 85 additions & 86 deletions
171
packages/code-du-travail-css/docs/css/components/_categories.css
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,100 @@ | ||
.categories { | ||
/* Gutters between items. */ | ||
/* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Mastering_Wrapping_of_Flex_Items */ | ||
--flex-gutter-size: 10px; | ||
/* Gutters between items. */ | ||
/* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Mastering_Wrapping_of_Flex_Items */ | ||
--flex-gutter-size: 10px; | ||
} | ||
|
||
.categories header { | ||
margin-bottom: var(--spacing-large); | ||
margin-bottom: var(--spacing-large); | ||
} | ||
|
||
.categories__list { | ||
display: flex; /* Flex layout so items have equal height. */ | ||
flex-wrap: wrap; | ||
justify-content: flex-start; | ||
align-content: flex-start; | ||
list-style-type: none; | ||
padding: 0; | ||
/* Use negative margins on sides to create gutters that do not also | ||
display: flex; /* Flex layout so items have equal height. */ | ||
flex-wrap: wrap; | ||
justify-content: flex-start; | ||
align-content: flex-start; | ||
list-style-type: none; | ||
padding: 0; | ||
/* Use negative margins on sides to create gutters that do not also | ||
create a gutter at the edges of the container. */ | ||
margin: calc(var(--flex-gutter-size) * -1); | ||
margin: calc(var(--flex-gutter-size) * -1); | ||
} | ||
|
||
.categories__list-item { | ||
|
||
/*width:calc(100%/4 - 2 * var(--flex-gutter-size)) ;*/ | ||
/*flex: 0 0 250px;*/ | ||
/*margin: var(--flex-gutter-size);*/ /* Gutters between items. */ | ||
width: media( | ||
calc(100%/4 - 2 * var(--flex-gutter-size)), | ||
(--bp-tablet) calc(100%/3 - 2 * var(--flex-gutter-size)), | ||
(--bp-mobile) calc(100% - 2 * var(--flex-gutter-size)), | ||
); | ||
|
||
margin: var(--flex-gutter-size); | ||
text-align: center; | ||
|
||
& a, | ||
& a:link, | ||
& a:visited { | ||
display: block; | ||
height: 100%; | ||
padding: var(--spacing-small) var(--spacing-base); | ||
border: 1px solid var(--color-element-border); | ||
border-radius: var(--border-radius-base); | ||
background: var(--color-white); | ||
color: var(--color-light-text); | ||
text-decoration: none; | ||
transition: all .2s ease; | ||
} | ||
|
||
& a:focus, | ||
& a:hover, | ||
& a:active { | ||
transform: scale(1.1); | ||
border: 1px solid var(--color-focus); | ||
box-shadow: 0 0 2px 2px var(--color-focus-shadow); | ||
} | ||
|
||
& a:focus h3, | ||
& a:hover h3, | ||
& a:active h3 { | ||
/*text-decoration: underline;*/ | ||
|
||
} | ||
|
||
& h3, & p { | ||
font-size: 0.9375rem; | ||
} | ||
|
||
& a img { | ||
display: inline-block; | ||
width: 2.5rem; | ||
margin: var(--spacing-small) 0; | ||
} | ||
/*width:calc(100%/4 - 2 * var(--flex-gutter-size)) ;*/ | ||
/*flex: 0 0 250px;*/ | ||
/*margin: var(--flex-gutter-size);*/ /* Gutters between items. */ | ||
width: media( | ||
calc(100% / 4 - 2 * var(--flex-gutter-size)), | ||
(--bp-tablet) calc(100% / 3 - 2 * var(--flex-gutter-size)), | ||
(--bp-mobile) calc(100% - 2 * var(--flex-gutter-size)) | ||
); | ||
|
||
margin: var(--flex-gutter-size); | ||
text-align: center; | ||
|
||
& a, | ||
& a:link, | ||
& a:visited { | ||
display: block; | ||
height: 100%; | ||
padding: var(--spacing-small) var(--spacing-base); | ||
border: 1px solid var(--color-element-border); | ||
border-radius: var(--border-radius-base); | ||
background: var(--color-white); | ||
color: var(--color-light-text); | ||
text-decoration: none; | ||
transition: all 0.2s ease; | ||
} | ||
|
||
& a:focus, | ||
& a:hover, | ||
& a:active { | ||
transform: scale(1.1); | ||
border: 1px solid var(--color-focus); | ||
box-shadow: 0 0 2px 2px var(--color-focus-shadow); | ||
} | ||
|
||
& a:focus h3, | ||
& a:hover h3, | ||
& a:active h3 { | ||
/*text-decoration: underline;*/ | ||
} | ||
|
||
& h3, | ||
& p { | ||
font-size: 0.9375rem; | ||
} | ||
|
||
& a img { | ||
display: inline-block; | ||
width: 2.5rem; | ||
margin: var(--spacing-small) 0; | ||
} | ||
} | ||
|
||
.categories__list-item--small { | ||
|
||
& a, | ||
& a:link, | ||
& a:visited { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-around; | ||
text-align: left; | ||
} | ||
|
||
& figure { | ||
margin: .5rem; | ||
} | ||
|
||
& img { | ||
width: 2.5rem; | ||
margin: .2rem auto; | ||
} | ||
|
||
& h3, & p { | ||
font-size: .8125rem; | ||
margin: .5rem | ||
} | ||
& a, | ||
& a:link, | ||
& a:visited { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-around; | ||
text-align: left; | ||
} | ||
|
||
& figure { | ||
margin: 0.5rem; | ||
} | ||
|
||
& img { | ||
width: 2.5rem; | ||
margin: 0.2rem auto; | ||
} | ||
|
||
& h3, | ||
& p { | ||
font-size: 0.8125rem; | ||
margin: 0.5rem; | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
module.exports = { | ||
presets: ["next/babel"], | ||
env: { | ||
test: { | ||
presets: [["next/babel", { "preset-env": { modules: "commonjs" } }]] | ||
} | ||
} | ||
presets: [ | ||
[ | ||
"next/babel", | ||
{ | ||
"preset-env": { | ||
targets: { | ||
browsers: ["last 5 version", "IE>=10"] | ||
} | ||
} | ||
} | ||
] | ||
] | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
const withCSS = require("@zeit/next-css"); | ||
const withTM = require("next-plugin-transpile-modules"); | ||
|
||
module.exports = withCSS({ | ||
// https://github.com/zeit/next.js/#disabling-file-system-routing | ||
useFileSystemPublicRoutes: false, | ||
webpack(config, options) { | ||
config.module.rules.push({ | ||
test: /\.(png|woff|woff2|eot|ttf|svg|gif|jpg)$/, | ||
loader: "file-loader", | ||
options: { | ||
publicPath: "/_next/static/", | ||
outputPath: "static/" | ||
} | ||
}); | ||
return config; | ||
}, | ||
publicRuntimeConfig: { | ||
API_URL: process.env.API_URL || "http://127.0.0.1:1337/api/v1", | ||
API_ADDRESS: "https://api-adresse.data.gouv.fr/search", | ||
PACKAGE_VERSION: require('./package.json').version, | ||
SENTRY_PUBLIC_DSN: process.env.SENTRY_PUBLIC_DSN, | ||
PIWIK_URL: process.env.PIWIK_URL, | ||
PIWIK_SITE_ID: process.env.PIWIK_SITE_ID, | ||
FRONTEND_PORT: process.env.FRONTEND_PORT, | ||
NODE_ENV: process.env.NODE_ENV | ||
} | ||
}); | ||
module.exports = withTM( | ||
withCSS({ | ||
// https://github.com/zeit/next.js/#disabling-file-system-routing | ||
useFileSystemPublicRoutes: false, | ||
transpileModules: ["p-debounce"], | ||
webpack(config, options) { | ||
config.module.rules.push({ | ||
test: /\.(png|woff|woff2|eot|ttf|svg|gif|jpg)$/, | ||
loader: "file-loader", | ||
options: { | ||
publicPath: "/_next/static/", | ||
outputPath: "static/" | ||
} | ||
}); | ||
return config; | ||
}, | ||
publicRuntimeConfig: { | ||
API_URL: process.env.API_URL || "http://127.0.0.1:1337/api/v1", | ||
API_ADDRESS: "https://api-adresse.data.gouv.fr/search", | ||
PACKAGE_VERSION: require("./package.json").version, | ||
SENTRY_PUBLIC_DSN: process.env.SENTRY_PUBLIC_DSN, | ||
PIWIK_URL: process.env.PIWIK_URL, | ||
PIWIK_SITE_ID: process.env.PIWIK_SITE_ID, | ||
FRONTEND_PORT: process.env.FRONTEND_PORT, | ||
NODE_ENV: process.env.NODE_ENV | ||
} | ||
}) | ||
); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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