Meaning of “flirt with sth” - Learner’s Dictionary

flirt with sth

phrasal verb with flirt uk us /flɜːt/ verb [ I ]

to be interested in an idea, activity, etc but not seriously, or for only a short time:

He flirted with the idea of becoming a priest.
flirt with danger/disaster, etc

to risk experiencing something bad

flirtation uk us /flɜːˈteɪʃən/ noun [ C, U ]

(Definition of “flirt with sth” from the Cambridge Learner’s Dictionary © Cambridge University Press)