PERF: only output an html id if a style is applied
- [x] closes #20695
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Greatly reduces the amount of `id` tag in the cells by only assigning one when a style is applied to that cell. If that is the not correct approach for solving #20695, I am open to suggestions.

Also I was confused by the `%-` tags to handle the whitespaces. Is there a reason the default options to handle whitespace are not used?
Hello @Moisan! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/io/formats/style.py`](https://github.com/Moisan/pandas/blob/b6f64637b084a929fb7b2809760e46f3fbdcc8f3/pandas/io/formats/style.py) !

 # [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23019?src=pr&el=h1) Report
> Merging [#23019](https://codecov.io/gh/pandas-dev/pandas/pull/23019?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/12a0dc49ac63b63bcc5f93bccf71bce51c60bdad?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/23019/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/23019?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #23019      +/-   ##
==========================================
+ Coverage    92.2%    92.2%   +<.01%     
==========================================
  Files         169      169              
  Lines       50888    50892       +4     
==========================================
+ Hits        46919    46923       +4     
  Misses       3969     3969
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.62% <100%> (ø)` | :arrow_up: |
| #single | `42.24% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/23019?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/formats/style.py](https://codecov.io/gh/pandas-dev/pandas/pull/23019/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvc3R5bGUucHk=) | `96.69% <100%> (+0.03%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23019?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23019?src=pr&el=footer). Last update [12a0dc4...1d726a4](https://codecov.io/gh/pandas-dev/pandas/pull/23019?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 I think this should be a parameter given to the Styler constructor, not something that happens implicitly. @TomAugspurger ping