I don't usually use the pandas style, so I looked it up. The following code will help you. It's like we have a priority of styles.
The one you set later takes precedence. It seems that you can specify the selector at once, but you need to specify each one.
import numpy as np
import pandas as pd
from IPython.display import display, HTML
df = pd.DataFrame([[1, 2], [3, 4]], index=["a", "b"], columns=["A", "B"])
style = df.style.set_table_styles(
[{"selector": "", "props": [("border", "1px solid grey")]},
{"selector": "tbody td", "props": [("border", "1px solid grey")]},
{"selector": "th", "props": [("border", "1px solid grey")]}
]
)
HTML(style.render())