diff --git a/bleach/sanitizer.py b/bleach/sanitizer.py
index 6527ac0..da9637c 100644
--- a/bleach/sanitizer.py
+++ b/bleach/sanitizer.py
@@ -48,6 +48,10 @@ INVISIBLE_CHARACTERS_RE = re.compile("[" + INVISIBLE_CHARACTERS + "]", re.UNICOD
 INVISIBLE_REPLACEMENT_CHAR = "?"
 
 
+class NoCssSanitizerWarning(UserWarning):
+    pass
+
+
 class Cleaner:
     """Cleaner for cleaning HTML fragments of malicious content
 
@@ -143,6 +147,25 @@ class Cleaner:
             alphabetical_attributes=False,
         )
 
+        if css_sanitizer is None:
+            # FIXME(willkg): this doesn't handle when attributes or an
+            # attributes value is a callable
+            attributes_values = []
+            if isinstance(attributes, list):
+                attributes_values = attributes
+
+            elif isinstance(attributes, dict):
+                attributes_values = []
+                for values in attributes.values():
+                    if isinstance(values, (list, tuple)):
+                        attributes_values.extend(values)
+
+            if "style" in attributes_values:
+                warnings.warn(
+                    "'style' attribute specified, but css_sanitizer not set.",
+                    category=NoCssSanitizerWarning,
+                )
+
     def clean(self, text):
         """Cleans text and returns sanitized result as unicode
 
diff --git a/docs/clean.rst b/docs/clean.rst
index 7cfa757..9ebf74b 100644
--- a/docs/clean.rst
+++ b/docs/clean.rst
@@ -79,6 +79,12 @@ The default value is also a conservative dict found in
 ``bleach.sanitizer.ALLOWED_ATTRIBUTES``.
 
 
+.. Note::
+
+   If you allow ``style``, you need to also sanitize css. See
+   :ref:`clean-chapter-sanitizing-css` for details.
+
+
 .. autodata:: bleach.sanitizer.ALLOWED_ATTRIBUTES
 
 .. versionchanged:: 2.0
@@ -280,6 +286,8 @@ By default, Bleach will strip out HTML comments. To disable this behavior, set
    'my<!-- commented --> html'
 
 
+.. _clean-chapter-sanitizing-css:
+
 Sanitizing CSS
 ==============
 
diff --git a/setup.cfg b/setup.cfg
index aafdd5c..f631ecc 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -15,4 +15,6 @@ ignore =
 max-line-length = 88
 
 [tool:pytest]
-addopts = -W error:html5lib:DeprecationWarning
+filterwarnings =
+    error
+    ignore::bleach.sanitizer.NoCssSanitizerWarning

diff --git a/tests/test_clean.py b/tests/test_clean.py
index 4abe991..10a91fd 100644
--- a/tests/test_clean.py
+++ b/tests/test_clean.py
@@ -4,7 +4,7 @@ import pytest
 
 from bleach import clean
 from bleach.html5lib_shim import Filter
-from bleach.sanitizer import ALLOWED_PROTOCOLS, Cleaner
+from bleach.sanitizer import ALLOWED_PROTOCOLS, Cleaner, NoCssSanitizerWarning
 from bleach._vendor.html5lib.constants import rcdataElements
 
 
@@ -1176,6 +1176,20 @@ def test_preserves_attributes_order():
     assert cleaned_html == html
 
 
+@pytest.mark.parametrize(
+    "attr",
+    (
+        ["style"],
+        {"*": ["style"]},
+    ),
+)
+def test_css_sanitizer_warning(attr):
+    # If you have "style" in attributes, but don't set a css_sanitizer, it
+    # should raise a warning.
+    with pytest.warns(NoCssSanitizerWarning):
+        clean("foo", attributes=attr)
+
+
 class TestCleaner:
     def test_basics(self):
         TAGS = ["span", "br"]

bug: bleach truncates Katex style attributes
**Bleach truncates a lot of Katex style attributes**

Basic example: a markdown_katex output may contain a span like so : `<span class="vlist" style="height:1.0697em;">`. It contains a `style` attribute, and when passed through bleach (allowing the `style` attribute), I get this:

```
<span class="vlist" style=""></span>
```

While the desired output would be:

```
<span class="vlist" style="height:1.0697em;"></span>
```

As a result, actual Katex math doesn't render properly.

** python and bleach versions:**

 - Python Version: 3.9.2
 - Bleach Version: 5.0.1
 - Markdown-katex Version: 202112.1034

**To Reproduce**

Steps to reproduce the behavior:

```python
from bleach import Cleaner
 
cleaner = Cleaner(tags = ['span'],
                  attributes = {'span': ['class', 'style']})
          
minimal_katex_span = '<span class="vlist" style="height:1.0697em;">'
res = cleaner.clean(minimal_katex_span)
print(res)
```

**Additional context**

I am unsure if this is actually a bug or intended behavior in some way. The more general problem I face is: how to correctly use bleach after user input is transformed through markdown with the markdown_katex extension?

tests/test_clean.py::test_clean_idempotent[a tests/test_clean.py::test_clean_idempotent[link tests/test_clean.py::test_clean_idempotent[text<em>] tests/test_clean.py::test_clean_idempotent[<span>text tests/test_clean.py::test_clean_idempotent[jim tests/test_clean.py::test_clean_idempotent[&&nbsp; tests/test_clean.py::test_clean_idempotent[<a tests/test_clean.py::test_clean_idempotent_img tests/test_clean.py::test_only_text_is_cleaned tests/test_clean.py::test_empty tests/test_clean.py::test_content_has_no_html tests/test_clean.py::test_content_has_allowed_html[an tests/test_clean.py::test_content_has_allowed_html[another tests/test_clean.py::test_html_is_lowercased tests/test_clean.py::test_comments[<!-- tests/test_clean.py::test_comments[<!--open tests/test_clean.py::test_comments[<!--comment-->text-True-text] tests/test_clean.py::test_comments[<!--comment-->text-False-<!--comment-->text] tests/test_clean.py::test_comments[text<!-- tests/test_clean.py::test_comments[text<!--comment-->-True-text] tests/test_clean.py::test_comments[text<!--comment-->-False-text<!--comment-->] tests/test_clean.py::test_invalid_char_in_tag tests/test_clean.py::test_unclosed_tag tests/test_clean.py::test_nested_script_tag tests/test_clean.py::test_bare_entities_get_escaped_correctly[an tests/test_clean.py::test_bare_entities_get_escaped_correctly[tag tests/test_clean.py::test_lessthan_escaping[x<y-x&lt;y] tests/test_clean.py::test_lessthan_escaping[<y-&lt;y] tests/test_clean.py::test_lessthan_escaping[x tests/test_clean.py::test_lessthan_escaping[<y>-&lt;y&gt;] tests/test_clean.py::test_character_entities_handling[&amp;-&amp;] tests/test_clean.py::test_character_entities_handling[&nbsp;-&nbsp;] tests/test_clean.py::test_character_entities_handling[&nbsp; tests/test_clean.py::test_character_entities_handling[&lt;em&gt;strong&lt;/em&gt;-&lt;em&gt;strong&lt;/em&gt;] tests/test_clean.py::test_character_entities_handling[&amp;is tests/test_clean.py::test_character_entities_handling[cool tests/test_clean.py::test_character_entities_handling[&&amp; tests/test_clean.py::test_character_entities_handling[&amp; tests/test_clean.py::test_character_entities_handling[this tests/test_clean.py::test_character_entities_handling[http://example.com?active=true&current=true-http://example.com?active=true&amp;current=true] tests/test_clean.py::test_character_entities_handling[<a tests/test_clean.py::test_character_entities_handling[&xx;-&amp;xx;] tests/test_clean.py::test_character_entities_handling[&adp;-&amp;adp;] tests/test_clean.py::test_character_entities_handling[&currdupe;-&amp;currdupe;] tests/test_clean.py::test_character_entities_handling[&#39;-&#39;] tests/test_clean.py::test_character_entities_handling[&#34;-&#34;] tests/test_clean.py::test_character_entities_handling[&#123;-&#123;] tests/test_clean.py::test_character_entities_handling[&#x0007b;-&#x0007b;] tests/test_clean.py::test_character_entities_handling[&#x0007B;-&#x0007B;] tests/test_clean.py::test_character_entities_handling[&#-&amp;#] tests/test_clean.py::test_character_entities_handling[&#<-&amp;#&lt;] tests/test_clean.py::test_character_entities_handling[&#39;&#34;-&#39;&#34;] tests/test_clean.py::test_stripping_tags[a tests/test_clean.py::test_stripping_tags[<p><a tests/test_clean.py::test_stripping_tags[<p><span>multiply tests/test_clean.py::test_stripping_tags[<ul><li><script></li></ul>-kwargs4-<ul><li></li></ul>] tests/test_clean.py::test_stripping_tags[<isindex>-kwargs6-] tests/test_clean.py::test_stripping_tags[Yeah tests/test_clean.py::test_stripping_tags[<sarcasm>-kwargs8-] tests/test_clean.py::test_stripping_tags[</sarcasm>-kwargs9-] tests/test_clean.py::test_stripping_tags[</ tests/test_clean.py::test_stripping_tags[Foo tests/test_clean.py::test_stripping_tags[Favorite tests/test_clean.py::test_stripping_tags[</3-kwargs14-&lt;/3] tests/test_clean.py::test_escaping_tags[<img tests/test_clean.py::test_escaping_tags[<script>safe()</script>-&lt;script&gt;safe()&lt;/script&gt;] tests/test_clean.py::test_escaping_tags[<style>body{}</style>-&lt;style&gt;body{}&lt;/style&gt;] tests/test_clean.py::test_escaping_tags[<ul><li><script></li></ul>-<ul><li>&lt;script&gt;</li></ul>] tests/test_clean.py::test_escaping_tags[<isindex>-&lt;isindex&gt;] tests/test_clean.py::test_escaping_tags[<sarcasm/>-&lt;sarcasm/&gt;] tests/test_clean.py::test_escaping_tags[<sarcasm>-&lt;sarcasm&gt;] tests/test_clean.py::test_escaping_tags[</sarcasm>-&lt;/sarcasm&gt;] tests/test_clean.py::test_escaping_tags[</ tests/test_clean.py::test_escaping_tags[</3-&lt;/3] tests/test_clean.py::test_escaping_tags[<bar@example.com>-&lt;bar@example.com&gt;] tests/test_clean.py::test_escaping_tags[Favorite tests/test_clean.py::test_stripping_tags_is_safe[<scri<script>pt>alert(1)</scr</script>ipt>-pt&gt;alert(1)ipt&gt;] tests/test_clean.py::test_stripping_tags_is_safe[<scri<scri<script>pt>pt>alert(1)</script>-pt&gt;pt&gt;alert(1)] tests/test_clean.py::test_href_with_wrong_tag tests/test_clean.py::test_disallowed_attr tests/test_clean.py::test_unquoted_attr_values_are_quoted tests/test_clean.py::test_unquoted_event_handler_attr_value tests/test_clean.py::test_invalid_filter_attr tests/test_clean.py::test_poster_attribute tests/test_clean.py::test_attributes_callable tests/test_clean.py::test_attributes_wildcard tests/test_clean.py::test_attributes_wildcard_callable tests/test_clean.py::test_attributes_tag_callable tests/test_clean.py::test_attributes_tag_list tests/test_clean.py::test_attributes_list tests/test_clean.py::test_uri_value_allowed_protocols[<a tests/test_clean.py::test_svg_attr_val_allows_ref tests/test_clean.py::test_svg_allow_local_href[<svg><pattern tests/test_clean.py::test_svg_allow_local_href_nonlocal[<svg><pattern tests/test_clean.py::test_invisible_characters[1\x0723-1?23] tests/test_clean.py::test_invisible_characters[1\x0823-1?23] tests/test_clean.py::test_invisible_characters[1\x0b23-1?23] tests/test_clean.py::test_invisible_characters[1\x0c23-1?23] tests/test_clean.py::test_invisible_characters[import tests/test_clean.py::test_nonexistent_namespace tests/test_clean.py::test_self_closing_tags_self_close[area] tests/test_clean.py::test_self_closing_tags_self_close[base] tests/test_clean.py::test_self_closing_tags_self_close[br] tests/test_clean.py::test_self_closing_tags_self_close[embed] tests/test_clean.py::test_self_closing_tags_self_close[hr] tests/test_clean.py::test_self_closing_tags_self_close[img] tests/test_clean.py::test_self_closing_tags_self_close[input] tests/test_clean.py::test_self_closing_tags_self_close[link] tests/test_clean.py::test_self_closing_tags_self_close[meta] tests/test_clean.py::test_self_closing_tags_self_close[param] tests/test_clean.py::test_self_closing_tags_self_close[source] tests/test_clean.py::test_self_closing_tags_self_close[track] tests/test_clean.py::test_noscript_rawtag_[title-<noscript><title></noscript><img tests/test_clean.py::test_noscript_rawtag_[textarea-<noscript><textarea></noscript><img tests/test_clean.py::test_noscript_rawtag_[script-<noscript><script></noscript><img tests/test_clean.py::test_noscript_rawtag_[style-<noscript><style></noscript><img tests/test_clean.py::test_noscript_rawtag_[noembed-<noscript><noembed></noscript><img tests/test_clean.py::test_noscript_rawtag_[noframes-<noscript><noframes></noscript><img tests/test_clean.py::test_noscript_rawtag_[iframe-<noscript><iframe></noscript><img tests/test_clean.py::test_noscript_rawtag_[xmp-<noscript><xmp></noscript><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[math-style-<math><style><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[math-noembed-<math><noembed><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[math-iframe-<math><iframe><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[math-xmp-<math><xmp><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[math-noframes-<math><noframes><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[math-noscript-<math><noscript><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[math-script-<math><script><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[svg-style-<svg><style><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[svg-noembed-<svg><noembed><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[svg-iframe-<svg><iframe><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[svg-xmp-<svg><xmp><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[svg-noframes-<svg><noframes><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[svg-noscript-<svg><noscript><img tests/test_clean.py::test_namespace_rc_data_element_strip_false[svg-script-<svg><script><img tests/test_clean.py::test_html_comments_escaped[math-p-style-<math></p><style><!--</style><img tests/test_clean.py::test_html_comments_escaped[math-br-style-<math></br><style><!--</style><img tests/test_clean.py::test_html_comments_escaped[svg-p-style-<svg></p><style><!--</style><img tests/test_clean.py::test_html_comments_escaped[svg-br-style-<svg></br><style><!--</style><img tests/test_clean.py::test_html_comments_escaped[math-p-title-<math></p><title><!--</title><img tests/test_clean.py::test_html_comments_escaped[math-br-title-<math></br><title><!--</title><img tests/test_clean.py::test_html_comments_escaped[svg-p-title-<svg></p><title><!--</title><img tests/test_clean.py::test_html_comments_escaped[svg-br-title-<svg></br><title><!--</title><img tests/test_clean.py::test_html_comments_escaped[math-p-noscript-<math></p><noscript><!--</noscript><img tests/test_clean.py::test_html_comments_escaped[math-br-noscript-<math></br><noscript><!--</noscript><img tests/test_clean.py::test_html_comments_escaped[svg-p-noscript-<svg></p><noscript><!--</noscript><img tests/test_clean.py::test_html_comments_escaped[svg-br-noscript-<svg></br><noscript><!--</noscript><img tests/test_clean.py::test_html_comments_escaped[math-p-script-<math></p><script><!--</script><img tests/test_clean.py::test_html_comments_escaped[math-br-script-<math></br><script><!--</script><img tests/test_clean.py::test_html_comments_escaped[svg-p-script-<svg></p><script><!--</script><img tests/test_clean.py::test_html_comments_escaped[svg-br-script-<svg></br><script><!--</script><img tests/test_clean.py::test_html_comments_escaped[math-p-noembed-<math></p><noembed><!--</noembed><img tests/test_clean.py::test_html_comments_escaped[math-br-noembed-<math></br><noembed><!--</noembed><img tests/test_clean.py::test_html_comments_escaped[svg-p-noembed-<svg></p><noembed><!--</noembed><img tests/test_clean.py::test_html_comments_escaped[svg-br-noembed-<svg></br><noembed><!--</noembed><img tests/test_clean.py::test_html_comments_escaped[math-p-textarea-<math></p><textarea><!--</textarea><img tests/test_clean.py::test_html_comments_escaped[math-br-textarea-<math></br><textarea><!--</textarea><img tests/test_clean.py::test_html_comments_escaped[svg-p-textarea-<svg></p><textarea><!--</textarea><img tests/test_clean.py::test_html_comments_escaped[svg-br-textarea-<svg></br><textarea><!--</textarea><img tests/test_clean.py::test_html_comments_escaped[math-p-noframes-<math></p><noframes><!--</noframes><img tests/test_clean.py::test_html_comments_escaped[math-br-noframes-<math></br><noframes><!--</noframes><img tests/test_clean.py::test_html_comments_escaped[svg-p-noframes-<svg></p><noframes><!--</noframes><img tests/test_clean.py::test_html_comments_escaped[svg-br-noframes-<svg></br><noframes><!--</noframes><img tests/test_clean.py::test_html_comments_escaped[math-p-iframe-<math></p><iframe><!--</iframe><img tests/test_clean.py::test_html_comments_escaped[math-br-iframe-<math></br><iframe><!--</iframe><img tests/test_clean.py::test_html_comments_escaped[svg-p-iframe-<svg></p><iframe><!--</iframe><img tests/test_clean.py::test_html_comments_escaped[svg-br-iframe-<svg></br><iframe><!--</iframe><img tests/test_clean.py::test_html_comments_escaped[math-p-xmp-<math></p><xmp><!--</xmp><img tests/test_clean.py::test_html_comments_escaped[math-br-xmp-<math></br><xmp><!--</xmp><img tests/test_clean.py::test_html_comments_escaped[svg-p-xmp-<svg></p><xmp><!--</xmp><img tests/test_clean.py::test_html_comments_escaped[svg-br-xmp-<svg></br><xmp><!--</xmp><img tests/test_clean.py::test_strip_respects_block_level_elements[<p>Te<b>st</b>!</p><p>Hello</p>-Test!\nHello] tests/test_clean.py::test_strip_respects_block_level_elements[<p>This tests/test_clean.py::test_strip_respects_block_level_elements[<div><p>This tests/test_clean.py::test_regressions[1.test] tests/test_clean.py::test_regressions[2.test] tests/test_clean.py::test_regressions[3.test] tests/test_clean.py::test_regressions[4.test] tests/test_clean.py::test_regressions[5.test] tests/test_clean.py::test_regressions[6.test] tests/test_clean.py::test_regressions[7.test] tests/test_clean.py::test_regressions[8.test] tests/test_clean.py::test_regressions[9.test] tests/test_clean.py::test_regressions[10.test] tests/test_clean.py::test_regressions[11.test] tests/test_clean.py::test_regressions[12.test] tests/test_clean.py::test_regressions[13.test] tests/test_clean.py::test_regressions[14.test] tests/test_clean.py::test_regressions[15.test] tests/test_clean.py::test_regressions[16.test] tests/test_clean.py::test_regressions[17.test] tests/test_clean.py::test_regressions[18.test] tests/test_clean.py::test_regressions[19.test] tests/test_clean.py::test_regressions[20.test] tests/test_clean.py::test_preserves_attributes_order tests/test_clean.py::test_css_sanitizer_warning[attr0] tests/test_clean.py::test_css_sanitizer_warning[attr1] tests/test_clean.py::TestCleaner::test_basics tests/test_clean.py::TestCleaner::test_filters