The multiclassing spellcasting rules (PHB p. 164, or here in the basic rules) state:
Each spell you know and prepare is associated with one of your classes, and you use the spellcasting ability of that class when you cast the spell.
According to the above, every spell you know or prepare should be associated with a class.
- However, for spells learned from feats like Drow High Magic or Wood Elf Magic are these actually associated with a class?
- If so, what class?
- If not, is the PHB statement above wrong/outdated?
- Are the spells learned in these feats (and others like it) associated with something else (like your race, in these cases)?
For reference, the Drow High Magic racial feat (XGtE p. 74) states:
You learn more of the magic typical of dark elves. You learn the detect magic spell and can cast it at will, without expending a spell slot. You also learn levitate and dispel magic, each of which you can cast once without expending a spell slot. You regain the ability to cast those two spells in this way when you finish a long rest. Charisma is your spellcasting ability for all three spells.
The Wood Elf Magic racial feat (XGtE p. 75) states:
You learn the magic of the primeval woods, which are revered and protected by your people. You learn one druid cantrip of your choice. You also learn the longstrider and pass without trace spells, each of which you can cast once without expending a spell slot. You regain the ability to cast these two spells in this way when you finish a long rest. Wisdom is your spellcasting ability for all three spells.
In regards to the third and fourth questions, the fact that the PHB quote says "use the spellcasting ability of that class when you cast the spell" and the fact that the feats specify what ability the spell uses in these examples (independent of class) suggests to me that they are not associated with class.