Commit Graph

28 Commits (master)

Author SHA1 Message Date
Vitaliy Filippov 7d48da227e Remove global variable, add ID to style elements so server- and client-rendered match each other 2021-08-11 21:14:14 +03:00
Alexander Grimalovsky 1f68495a17 fix(addStyles): update for test for old IE versions (#196) 2017-03-22 03:32:29 +01:00
Anton Strömkvist 663686884b feat: add insertInto option (#135) 2017-03-17 20:26:49 +01:00
Denis Koltsov 01080cf17f fix: syntax error in IE10 and below because of `const` keyword (#190) 2017-03-15 23:51:33 +01:00
John Anderson 19959eeb77 fix(fixUrls): add param to fix relative urls (#186) 2017-03-14 23:17:26 -05:00
Felix Mosheev 995f3de4d3 feat(tag-attribute): Add support for custom tag attribute 2017-03-14 23:16:02 -05:00
Dimitar Ivanov 2a2f261ef9 fix: Adds type attr. to the generated link element
Although the rel element is set to stylesheet the created link element does not specify the MIME type of the linked resource.
The MIME type is set to text/css similar to the case when an style element is created. This change also syncs with the addStylesUrl.js behavior where the type attribute is set.
2017-03-14 23:15:21 -05:00
Oskar Eriksson 9dc45a6dee Replace window with self for better web worker support 2016-10-27 11:28:17 +02:00
Nikita Khmourovitch 89d9a24828 drop unused vars 2016-01-16 17:09:31 +03:00
Tobias Koppers 4a13ce9590 finalized insertAt=top 2015-10-19 20:54:35 +02:00
Nick Elsbree b5bafcfdc8 Fixed ordering of stylesheets inserted with insertAt=top. 2015-10-15 16:57:52 -07:00
Nick Elsbree a081f99e27 Set insertAt parameter to default only when it is undefined. 2015-10-15 12:41:19 -07:00
Nick Elsbree 02e4fb5181 Throw error when insertAt parameter is not 'top' or 'bottom'. 2015-07-27 10:21:53 -07:00
Nick Elsbree 99d8fe064c Changed spaces to tabs. 2015-07-07 17:14:50 -07:00
Nick Elsbree 5459dd63e5 #56: Added support for 'insertAt' option. 2015-07-07 12:06:56 -07:00
Nickolay Ribal a41bbdb83f Wrap sourceMap JSON in unescape and encodeURIComponent. 2015-05-05 21:36:23 +03:00
Jason Anderson c56dacf4ed [#39] Don't use styleSheet to store state of css text
IE9 will actually drop certain things (like media queries) from the
cssText property when it is read back out. To fix, store the raw css
text in a separately managed array, and use that to form the entire
string that should be set on the style element's cssText property.

Fixes #39.
2015-04-14 09:13:34 +02:00
Tobias Koppers 8ec72674a2 added SourceMap support 2015-04-09 23:08:38 +02:00
Jake Scott d8ada9056b fixed regex 2015-02-27 11:41:35 -05:00
Jake Scott db33060185 apply ie9 singleton fix to all old IE browsers 2015-02-27 11:25:50 -05:00
Jake Scott 0541cbe84a apply ie9 singleton fix to all old IE browsers 2015-02-27 11:23:09 -05:00
Nick Dima 8ebe854151 Fix mime type 2014-11-15 14:25:27 +01:00
Tobias Koppers 490d3b0938 SourceMap support
fixes #30
fixes webpack/webpack#214
2014-11-03 23:23:50 +01:00
Jason Anderson 1d35be2844 Handle case of null/empty replacement 2014-11-03 15:21:39 +01:00
Jason Anderson 5d226596da Fix issue with non-singleton tag updating 2014-10-21 14:21:12 +02:00
Jason Anderson 7bdf6a5065 Better solution when combining HMR with singleton tags
Now, instead of assuming a constant length (d'oh), the boundaries of each
style block will be demarkated with a start/end token. When a style is updated,
the CSS block contents in between the boundaries is replaced. If a style is
removed, the entire section is removed. New sections are added to the bottom.
2014-10-21 11:36:13 +02:00
Jason Anderson b1a5566cfa Add option to re-use single <style> element
This adds the ability for the style-loader to re-use a single <style>
element reference when adding/removing styles from the page. This is
particularly important when you want to use style-loader with a browser
like IE9, which enforces a hard-limit on the # of style tags allowed on
the page at any given point.

This is added as a new option `singleton`, and is automatically turned
on if the browser is determined to be IE9.
2014-10-20 18:22:46 +02:00
Tobias Koppers 289e62f0c1 support an array of items with id
This ensures that items with the same id are only added once.
i. e. multiple css file and `@import` the same base css file and it's only added once to the DOM.

webpack/css-loader#17
2014-09-07 22:23:54 +02:00