Skip to content
Advertisement

Tag: javascript

Conditional test case in jasmine

I am writing Jasmine. I want that when the response from the site is ok (site uploaded- pending 200). Run the it’s (test cases) in spec and when the site is failed to load the site the it’s (test cases) will not run. I check the response from site in before all function. And now in each it that make

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

Advertisement