Skip to content
Advertisement

Can javascript make a custom @rule of css?

CSS have rules like @media, @keyframes, etc. Can such be made using javascript, e.g. @myCustomRule. If yes then how ? If no then is there any alternative to that or just to go with CSS ? Answer While you can’t create your own custom @rules, you can use the CSSOM to create supported rules and insert them into one of

Not quite hexagon looking border with CSS

Basically I’m trying to get this layout in CSS. I’ve somewhat working modal but I’m finding it hard to get the white box behind the text that is responsive and works for all screen sizes. Answer I have made you an example below using clip path. I personally would look to use an svg, due to browser support. See https://caniuse.com/#search=clip%20path

Electron+nuxt+amCharts 4: Unexpected token export

I want to code a desktop application using Electron, nuxt.js and am4charts. When importing the am4charts core with import * as am4core from ‘@amcharts/amcharts4/core’ the app returns an error: My setup: Electron-nuxt boilerplate (https://github.com/michalzaq12/electron-nuxt) “@amcharts/amcharts4”: “^4.7.1” I already tried to transpile amCharts in nuxt.config.js using but without success. How can I fix this issue? Answer I found it could be

Advertisement